Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Server tags in CSS #593

Open
wwarnick opened this issue Nov 23, 2022 · 0 comments
Open

Server tags in CSS #593

wwarnick opened this issue Nov 23, 2022 · 0 comments

Comments

@wwarnick
Copy link

Hi,

We've been using the AjaxControlToolkit for many years, but just recently, a security scan flagged a "source code leakage" in some CSS returned by WebResource.axd. Specifically, it contained <%= %> server blocks.

Most of the CSS is normal, but the issue is with the following two CSS selectors:

  • .ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_active .ajax__tab_inner
  • .ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_active .ajax__tab_tab

Both of them have a <%=WebResource()%> value. Those server blocks were never replaced, so not only is the scan flagging it, but no background image is shown for elements that fit those specific selectors.

Here is the CSS:

.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_active .ajax__tab_inner {
     background-image:url('<%=WebResource(""AjaxControlToolkit.Images.Tabs.Bottom-ActiveLeft.gif"")%>')
}
.ajax__tab_xp .ajax__tab_header_bottom .ajax__tab_active .ajax__tab_tab {
     background-image:url('<%=WebResource(""AjaxControlToolkit.Images.Tabs.Bottom-Active.gif"")%>')
}

Here is the full CSS file: code leakage.css.txt

We are using AjaxControlToolkit version 20.1.0 from NuGet. I tested it in both Chrome and Firefox and it shows up in both. The site is deployed with IIS.

I've never seen this before. Am I doing something wrong on my end? Let me know if you need more information.

Thanks in advance!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant