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

[FEATURE]: Avoid forbidden characters in the search box #383

Closed
1 task done
herrardo opened this issue Mar 29, 2022 · 13 comments · Fixed by #433
Closed
1 task done

[FEATURE]: Avoid forbidden characters in the search box #383

herrardo opened this issue Mar 29, 2022 · 13 comments · Fixed by #433
Labels
begginer Good issues for begginers enhancement New feature or request good first issue Good for newcomers help wanted Good for contributors

Comments

@herrardo
Copy link
Contributor

herrardo commented Mar 29, 2022

How can the project be improved?

Avoid forbidden characters in the search box in order to prevent security issues such as XSS through code injection

How can this be solved?

Given a shopper typing in the search-box component
when the shopper types forbidden characters like < or >
then the search box prevents the acceptance of this characters
and nothing changes in the search box.

Proposed solution

Add a config to the SearchBox module to pass the characters to be forbidden.

Customizations supported

No response

Additional information

This is the location of the search-box module

Code of Conduct

  • I agree to follow this project's Code of Conduct.
@herrardo herrardo added enhancement New feature or request good first issue Good for newcomers help-wanted begginer Good issues for begginers labels Mar 29, 2022
@ritikBhandari
Copy link

Hi @herrardo,
Can I take up this issue?

@javieri-empathy
Copy link
Contributor

Sure @ritikBhandari! Ping us if you need any help. You can start by taking a look at the search-input component.

@ritikBhandari
Copy link

Sure. Thank you!

@ritikBhandari
Copy link

So what are the forbidden characters other than < and >? I guess majority the special characters right?

@tiborux
Copy link
Contributor

tiborux commented Mar 29, 2022

@ritikBhandari < and > should be enough.

@ritikBhandari
Copy link

Ohkay!
You've made it easier :)

@herrardo herrardo added help wanted Good for contributors and removed help-wanted labels Mar 30, 2022
@herrardo
Copy link
Contributor Author

Ohkay! You've made it easier :)

Hey @ritikBhandari !! Are you still interested or faced any problems? Let us know, have a good weekend ;)

@wannieman98
Copy link
Contributor

Can I give this issue a try?

@herrardo
Copy link
Contributor Author

Can I give this issue a try?

Sure @wannieman98 👍

@ritikBhandari
Copy link

ritikBhandari commented Apr 15, 2022

I'm really sorry for the inconvinience @herrardo. I was involved in some unavoidable issues lately. I'll definitely do it ASAP or @wannieman98 can also try.

@herrardo
Copy link
Contributor Author

I'm really sorry for the inconvinience @herrardo. I was involved in some unavoidable issues lately. I'll definitely do it ASAP or @wannieman98 can also try.

Don't worry about it. If you both try we'll review both PR's 🙌

@alonsogarciapablo
Copy link
Contributor

alonsogarciapablo commented Jun 22, 2022

Hola! @herrardo I've been taking a look at this today to get familiar with this codebase. I have a PR ready implementing this new prop as a blacklist (#573), but I just bumped into the following articles that discusses using blacklists vs using whitelists:

Have you guys considered using a whitelist instead (we would need to define what's the acceptable input)? Thank you!

@herrardo
Copy link
Contributor Author

@wannieman98 Thanks for the contribution! Your PR took a while to merge because we had issues to merge PR from outside the organization but everything got solved finally, thanks again ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
begginer Good issues for begginers enhancement New feature or request good first issue Good for newcomers help wanted Good for contributors
Projects
None yet
6 participants