-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XSS fixes #17
Comments
See experimental fixes on https://github.com/eprintsug/irstats2/tree/issue-17-xss Notes:
|
There may be other changes/improvements in how the cgi scripts read params - possibly replacing methods with a call to the |
NB I've also spotted that the base_url param in cgi/stats/set_finder (called from javascript) needs work. |
'xcuse my lack of ability in the dark-arts, but is dealing with the paramaters at the point they are written into the script tag https://github.com/eprints/irstats2/blob/master/lib/plugins/EPrints/Plugin/Stats/Context.pm#L320 an overly simple fix? It doesn't stop all sorts of cruft getting injected into various bits of html, but might keep it from getting executed? |
...Unless someone manages to escape from an attribute and shoehorn an entire script tag in there... I think the more fulsome approach is probably the wisest on reflection. As you were... |
Some params get passed via the javascript ajax params/context. Below is hopefully a definitive list. The 'context' params get sanitised in the proposed code in https://github.com/eprintsug/irstats2/blob/issue-17-xss/lib/plugins/EPrints/Plugin/Stats/Context.pm. The validation methods could be lifted into the
THis: https://github.com/eprintsug/irstats2/blob/issue-17-xss/cgi/stats/get#L78-L83 will need to understand expected params that are outside the |
@goetzk - with your release, thought it worth highlighting this:
eprints#95
I'll add some code today for review
The text was updated successfully, but these errors were encountered: