Fix typo in cwe863 lesson session attribute name#191
Open
james-carlson wants to merge 1 commit intoOWASP:mainfrom
Open
Fix typo in cwe863 lesson session attribute name#191james-carlson wants to merge 1 commit intoOWASP:mainfrom
james-carlson wants to merge 1 commit intoOWASP:mainfrom
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The CWE-863 (Incorrect Authorization) lesson at
trainingportal/static/lessons/blackBelt/cwe863.htmlhas a typo in thedisplayed sample code. On line 18, the first call to
session.getAttributereferences
"ch3loggedin", while the second call on the same line references"ch863loggedin". Since this is the same condition guarding access to theadmin page, both attribute names should match.
This PR changes
"ch3loggedin"->"ch863loggedin"so the snippet is internallyconsistent.
Note for maintainers (optional follow-up)
While verifying the typo, I noticed the lesson snippet uses the
ch863prefix(e.g.,
ch863loggedin,ch863.jsp) but the actual vulnerable code it isillustrating --
insecureinc/src/main/webapp/cwe863loggedin.jsp-- uses thecwe863prefix throughout (cwe863loggedin,cwe863.jsp).If the intent is for the lesson to mirror the real vulnerable JSP exactly, a
follow-up could rename all
ch863references tocwe863in this file. I keptthis PR scoped to the obvious typo to keep the change minimal -- happy to open
a separate PR for the broader rename if you'd like.
Test plan
trainingportal/static/lessons/blackBelt/cwe863.htmlin the trainingportal and confirm the rendered code block now shows
"ch863loggedin"onboth
session.getAttributecalls on line 18.