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

Fix syntax for Python 3.12 #421

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

wom-bat
Copy link

@wom-bat wom-bat commented Feb 15, 2025

Backslash needs escaping now. Otherwise one sees:

.../XSStrike/core/dom.py:27: SyntaxWarning: invalid escape sequence '$'
controlledVariables.add(re.search(r'[a-zA-Z$][a-zA-Z0-9$]+', part).group().replace('$', '$'))
.../XSStrike/core/dom.py:36: SyntaxWarning: invalid escape sequence '$'
controlledVariables.add(re.search(r'[a-zA-Z$][a-zA-Z0-9$]+', part).group().replace('$', '$'))

What does it implement/fix? Explain your changes.

Fixes a syntax error/python error

Where has this been tested?

Python Version: 3.12
Operating System: Linux/Debian

Does this close any currently open issues?

No

Does this add any new dependency?

No

Does this add any new command line switch/option?

No

Any other comments you would like to make?

Some Questions

  • [ YES] I have tested my build before submitting the pull request.

Backslash needs escaping now.  Otherwise one sees:

.../XSStrike/core/dom.py:27: SyntaxWarning: invalid escape sequence '\$'
  controlledVariables.add(re.search(r'[a-zA-Z$_][a-zA-Z0-9$_]+', part).group().replace('$', '\$'))
.../XSStrike/core/dom.py:36: SyntaxWarning: invalid escape sequence '\$'
  controlledVariables.add(re.search(r'[a-zA-Z$_][a-zA-Z0-9$_]+', part).group().replace('$', '\$'))

Signed-off-by: Peter Chubb <[email protected]>
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.

1 participant