Absent Member.
Absent Member.

Applications that leverage Microsoft AJAX.NET (Atlas) can be vulnerable to JavaScript hijacking,

I am getting a finding in my scan indicating that my code is vulnerable to JavaScript hijacking. My code dynamically generate all of the page content, including the Ajax ScriptManager. Because the content is not in the webpage as static markup it is my opinion that this is a false finding. Can someone review my code and either confirm or deny my belief and if I am incorrect recommend a proper implementation.

   private void CreateControls(ControlCollection cc)


   if (RadScriptManager.GetCurrent(_contextPage) == null)


   RadScriptManager rsm = new RadScriptManager();

  rsm.ID = "scriptManager";

Labels (1)
Tags (1)
1 Reply
Absent Member.
Absent Member.

I did modify the code and it appeared to correct the issue:

        byte[] bytes = Encoding.Default.GetBytes(Name);

        string strEncoded = Encoding.UTF8.GetString(bytes);

        LinkButtonControl.ID = strEncoded;



The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.