Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

XSS vulnerability fixed. [ High Priority ] #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DrHazemAli
Copy link

Hi,
There is an XSS vulnerability inside dropify.min.js allows client-side to perform JS actions when the image being uploaded in the preview inner because the filename itself can be renamed to an html or javascript code.

Example : (">< img src = x onerror=prompt(1) >.png)

Org:
this.filenameWrapper.children(".dropify-filename-inner").html(this.file.name);

Fixes :

this.filenameWrapper.children(".dropify-filename-inner").html(cleanHTMLi(this.file.name));

I've written a function to perform HTML cleanup:

function cleanHTMLi(s) {
return s.replace(/&/g, '&').replace(/</g, '<').replace(/"/g, '"');
}

Thanks,

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

Successfully merging this pull request may close these issues.

1 participant