Skip to content

Conversation

@phulelouch
Copy link

Hi all,

I have a reviewed the code and figured the 'thePath' parameter in core-war/src/main/webapp/wysiwyg/jsp/uploadWebsiteFile.jsp is obtained from the request and used to create a File object without validation, potentially allowing a user to write files to arbitrary locations on the filesystem. This is my suggest fix.

Cheer

Hi all, I have a reviewed of the code and figured the 'thePath' parameter is obtained from the request and used to create a File object without proper validation, potentially allowing user to write files to arbitrary locations on the filesystem. This is my suggest fix. Cheer
@mmoqui
Copy link
Member

mmoqui commented May 14, 2025

Hi, thanks for your report. I will have a look on it later. For the moment, we're all busy.

@mmoqui mmoqui self-assigned this May 19, 2025
SilverLogger.getLogger("wysiwyg").error("Error during file upload", e);
%>
<script language="javascript">
alert("<%=WebEncodeHelper.javaStringToJsString(message.getString("Error") + ": " + e.getMessage())%>");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of alert, we have our own way to inform the user by using our popin mechanism. In this case, the alert statement should be replaced by the following one:

sp.popup.error("<%=WebEncodeHelper.javaStringToJsString(message.getString("Error") + ": " + e.getMessage())%>");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants