Describe the problem you'd like to have solved
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.
Describe the problem you'd like to have solved
I'm a DevSec. I help developers teams find and fix their vulnerabilities.
In two of my last missions, I've seen developers using
decodeinstead ofverifyeven 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
decodefunction and call itunsafeDecode. (as suggested by @youssef-jbili)Other libraries have done it and it helps developers reduce their mistakes:
dangerouslySetInnerHTMLfor ReactbypassSecurityTrustHtmlfor AngularI can make a Pull Request if you think it is a good idea.