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

Webapp javascript doesn't not properly escape values #27

Closed
dfish3r opened this Issue Feb 25, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@dfish3r
Copy link
Member

dfish3r commented Feb 25, 2015

The webapp component leverage jquery to render JSON from an LDAP.
HTML is built and then passed to the .html( ... ) function.
Add javascript escape function and pass attribute values through it before rendering.

@dfish3r

This comment has been minimized.

Copy link
Member

dfish3r commented Feb 25, 2015

Potential function

escapeHTML = function(s) {
        return String(s).replace(/&(?!\w+;)/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
      }

@dfish3r dfish3r closed this in ffd00bc Feb 26, 2015

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