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

Strip tags to sanitize input in User profile #42

Merged
merged 1 commit into from Jun 17, 2022
Merged

Strip tags to sanitize input in User profile #42

merged 1 commit into from Jun 17, 2022

Conversation

gautiermichelin
Copy link
Contributor

Strip tags to sanitize input in User profile and in Tags & Comments.
I had a mail from etat.ge.ch audit firm that reports these as XSS injection risk in their automated exam.

Strip tags to sanitize input in User profile and in Tags & Comments.
I had a mail from etat.ge.ch audit firm that reports these as XSS injection risk in their automated exam.
@collectiveaccess
Copy link
Owner

Striptags() is not enough. HTMLPurifier must be used. I'll add that shortly.

@gautiermichelin
Copy link
Contributor Author

Hi,

JavaScript is already removed (tested) but simple tags , ... are kept without attributes.

Gautier

@collectiveaccess
Copy link
Owner

What is the problem then?

@gautiermichelin
Copy link
Contributor Author

gautiermichelin commented Jun 17, 2022 via email

@collectiveaccess
Copy link
Owner

Is this an XSS risk? Or just a formatting issue?

@collectiveaccess
Copy link
Owner

I'm going to merge this, as regardless there's no reason for HTML tags to be in there.

@collectiveaccess collectiveaccess merged commit d2011d6 into collectiveaccess:master Jun 17, 2022
@gautiermichelin
Copy link
Contributor Author

Hi @collectiveaccess

I'm just answering your question.

For me, formatting isn't needed in these. As you can add tags here, it's reported as a risk with certains (at least one) automated XSS report tool. Let's remove this false positive.

Thanks for having merged this PR, best to all team member

@gautiermichelin gautiermichelin deleted the patch-2 branch June 18, 2022 13:17
@gautiermichelin
Copy link
Contributor Author

gautiermichelin commented Oct 11, 2022 via email

@collectiveaccess
Copy link
Owner

Ok sure let's do that then.

Can you make a new PR for both master and develop?

thanks

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