473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Microsoft Patch MS04-028 for the JPG security hole causes errors on Image Control

I think I have a somewhat unique situation here, so I thought I should
post it for the few poor souls who run across it and try to google it
like I did.

First of all, I was getting the following error when trying to hit one
of my pages...

---------------------------------------------------------------------
Invalid URI: There is an invalid sequence in the string.
---------------------------------------------------------------------

The situation: I built an ASP.NET (Framework 1.1) application for
e-commerce. In it, I have a template column in a datagrid that
contains a standard Image control whose ImageUrl property is assigned
through inline ASP script call to a method on my codebehind page like
so...
---------------------------------------------------------------------
<ItemTemplate>
<A href='<%# GetImageUrl ( DataBinder.Eval(Container,
"DataItem.MaleImageName"), true, false) %>' target="_blank'">

<asp:Image id=imgMaleSeries Width="80px" runat="server"
ImageUrl='<%# GetImageUrl ( DataBinder.Eval(Container,
"DataItem.MaleImageName"), true, false) %>' Height="60px"
ToolTip="Click here to view larger image.">
</asp:Image>

</A>

</ItemTemplate>
---------------------------------------------------------------------

Now, what that method does is takes an Application variable loaded
from a DB table containing configuration metadata for the site, and
append that to the name of the item to be displayed to create the full
path to the image to be displayed (the client wanted to be able to
move the images around sometimes, hence the need for this approach).

Recently, the page in question began throwing errors whose stack trace
looks like this...
---------------------------------------------------------------------
at System.Uri..ctor(String uriString, Boolean dontEscape)
at System.Web.Util.UrlPath.MakeRelative(String from, String to)
at System.Web.UI.Control.ResolveClientUrl(String relativeUrl)
at System.Web.UI.WebControls.Image.AddAttributesToRen der(HtmlTextWriter
writer)
at System.Web.UI.WebControls.WebControl.RenderBeginTa g(HtmlTextWriter
writer)
at System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter
writer)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
at System.Web.UI.WebControls.TableCell.RenderContents (HtmlTextWriter
writer)
at System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter
writer)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
at System.Web.UI.WebControls.WebControl.RenderContent s(HtmlTextWriter
writer)
at System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter
writer)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.WebControls.Table.RenderContents(Htm lTextWriter
writer)
at System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter
writer)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
at System.Web.UI.WebControls.WebControl.RenderContent s(HtmlTextWriter
writer)
at System.Web.UI.WebControls.BaseDataList.Render(Html TextWriter
writer)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren (HtmlTextWriter
writer)
at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTex tWriter
output)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain()
---------------------------------------------------------------------

This led me to examine that codebehind method that loads the ImageUrl,
where eventually I found that the value containing the path to the
image also contained an invisible, invalid character (I think it was a
carriage return). When I questioned the client, he told me that they
had recently applied the patch MS04-028 to protect against the
vulnerability described here
(http://www.microsoft.com/technet/sec...MS04-028.mspx).

I have not confirmed with MS, but I think that after the patch was
applied, the Image control was trying to resolve the supplied URI
somehow and was failing when it found the invalid character, whereas
before this patch was applied, the Image control simply took the
string and rendered it "as is". Once we removed the invalid character
(which by the way had been there all along and hadn't caused errors
prior to the patch being applied) from the DB field the application
worked as expected, loading the appropriate images for the items on
the list.

I was just hoping that if anyone out there ran into a combination of
conditions as rare as this one probably is, they might benefit from
our experience!

Greg Christie, MCSD
Jul 21 '05 #1
0 2019

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: PatchFactory Support | last post by:
Description: Professional and easy-to-use patch building environment that can help you to create instant patch packages for software and file updating. Generated patch packages are small size...
0
by: Vorname.nachname | last post by:
<HTML> <BODY> <center><table><tr><td><a hrefjxxzmzykmrhref=onxof href="http://xarwdcdb.plusherbal.biz/patch/?gfsowahrz"><IMG SRC="http://213.4.130.210/personal7/bolik15/patch/enp2_01.gif"...
29
by: Jim Hubbard | last post by:
Yet another hotfix alert (http://www.kbalertz.com/Feedback_823535.aspx) that states "To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix." ...
99
by: Jim Hubbard | last post by:
It seems that Microsoft not only does not need the classic Visual Basic developer army (the largest army of developers the world has ever seen), but now they don't need ANY Windows developer at a...
3
by: Joe | last post by:
Back in March I submitted a patch for cgi.py to sourceforge to fix a problem with the handling of an invalid REQUEST_METHOD. I thought I followed all the steps to properly submit the bug and...
0
by: George Meng | last post by:
Hi folks, Is there any tool out there can do: 1) compare two word documents, one is a old file, the other is a newer version of the same file. 2) generate a patch, the patch shows the differce...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 391 open ( +7) / 3028 closed (+12) / 3419 total (+19) Bugs : 906 open ( -3) / 5519 closed (+19) / 6425 total (+16) RFE : 207 open...
7
by: Steve Hershoff | last post by:
Thanks to this newsgroup I've been pointed to Microsoft's XML Diff & Patch utilities. I've been reading about how I can use the tools to generate a diffgram between two XML documents, and how the...
5
by: djoefish | last post by:
Does anyone know how to install a patch on Winodws? For example, I want to install the patch 'ocmalloc-free-arenas.diff' in Python 2.3. thanks...
3
by: Mukesh | last post by:
Thx Sloanfor the solution. It is working properly under Full trust When i tried it under unMedium trust it was giving error Parser Error Message: Required permissions cannot be acquired....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.