Skip to content
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

Fix potential XSS vulnerability on user's name #1108

Merged
merged 1 commit into from
Jul 18, 2014

Conversation

protich
Copy link
Member

@protich protich commented Jul 17, 2014

Names parsed from incoming emails are stored in the database as is. This pull request addresses potential XSS vulnerability due to improper storage and display of unsanitized names.

? array_map(array('Format','htmlencode'), $var)
: htmlentities($var, $flags, 'UTF-8');
? array_map(array('Format', 'htmlencode'), $var)
: htmlentities( (string) $var, $flags, 'UTF-8');
Copy link
Contributor

Choose a reason for hiding this comment

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

If we do

: htmlentities( (string) $var, $flags, 'UTF-8', false);

(add $double_encode = false to the argument list), then I think we can go ahead and sanitize the user name when saving to the database

Names parsed from incoming emails are stored in the database as is. This
pull request addresses potential XSS vulnerability due to improper display
of unsanitized names. Going forward names will be scrubbed on create.
@protich
Copy link
Member Author

protich commented Jul 17, 2014

Updated

greezybacon added a commit that referenced this pull request Jul 18, 2014
Fix potential XSS vulnerability on user's name

Reviewed-By: Jared Hancock <jared@osticket.com>
@greezybacon greezybacon merged commit 24dbf6e into osTicket:develop Jul 18, 2014
protich pushed a commit to protich/osTicket that referenced this pull request Jul 21, 2014
Fix potential XSS vulnerability on user's name

Reviewed-By: Jared Hancock <jared@osticket.com>
protich pushed a commit to protich/osTicket that referenced this pull request Jul 29, 2014
Fix potential XSS vulnerability on user's name

Reviewed-By: Jared Hancock <jared@osticket.com>
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.

None yet

2 participants