cancel
Showing results for 
Search instead for 
Did you mean: 

lafPath variable in standard portal

Former Member
0 Kudos

Hi,

    I am looking at html code from standard page in Portal as following :

<HEAD>

<TITLE>SAP Enterprise Portal</TITLE>

<script language="javascript">

var lafPath = getParameter("lafPath");

var lafFile1Path = lafPath + "/themes/portal/sap_standard/ctrl/ctrl_ie5.css";

var lafFile2Path = lafPath + "/themes/portal/sap_standard/prtl/prtl_ie5.css";

var lafFile3Path = lafPath + "/themes/portal/sap_standard/prtl_std/prtl_std_ie5.css";

document.write("<LINK REL=stylesheet HREF=\"" + lafFile1Path + "\">");

document.write("<LINK REL=stylesheet HREF=\"" + lafFile2Path + "\">");

document.write("<LINK REL=stylesheet HREF=\"" + lafFile3Path + "\">");

</script>

</HEAD>

I have no idea where the variable is set. Can you advise me.

Thank you,

Noppong

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Noppong,

The script https://<hostname>/irj/portalapps/com.sap.portal.admin.propertyeditor/html/ModalMsg.h

tml accepts user input as variable lafPath. This variable appears to be

being inserted directly into a Javascript request for a further URL

without sufficient input validation.

Regards

Shrikant

Former Member
0 Kudos

Hi Shrikant,

   Thank you for your answer. You are right. The user can put lafPath as get parameter. It could be Cross site scripting attack. I am looking for the way to prevent the Cross site scripting.

     Do you have related SAP note or any idea to prevent this?

Thank you,

Noppong Jinbunluphol

Former Member
0 Kudos

Hi Noppong Jinbunluphol,

I am not sure if these notes will help you , but please have a look.

Please read the following notes and check if you are in the correct SP and patch:-

1615941 - Portal XSS Encoding Library - StringUtils

866020  - SAP encoding functions in the Web environment

1601461 - Update #1 to Security Note 866020

1590008 - JAVA output encoding

Regards

shrikant

Answers (0)