You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a DevSec. I help developers teams find and fix their vulnerabilities.
In two of my last missions, I've seen developers using decode instead of verify even if the documentation has been improved.
Describe the ideal solution
To avoid this and reduce the vulnerable apps, I think it would be great to rename the decode function and call it unsafeDecode. (as suggested by @youssef-jbili)
Other libraries have done it and it helps developers reduce their mistakes:
dangerouslySetInnerHTML for React
bypassSecurityTrustHtml for Angular
I can make a Pull Request if you think it is a good idea.
Paulmolin, rajeshrah22, OKinane, mlcdf, youssef-jbili and 1 more