Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ValueError: invalid interpolation syntax #80

Open
NAs3c opened this issue Aug 11, 2022 · 0 comments
Open

ValueError: invalid interpolation syntax #80

NAs3c opened this issue Aug 11, 2022 · 0 comments

Comments

@NAs3c
Copy link

NAs3c commented Aug 11, 2022

Hi,

I encountered the following problem while trying to pass a jwt in a cookie (-rc) that was URL-encoded :

Traceback (most recent call last):
  File "C:\Tools\jwt_tool-master\jwt_tool.py", line 2002, in <module>
    config['argvals']['cookies'] = args.cookies
  File "configparser.py", line 1263, in __setitem__
  File "configparser.py", line 1205, in set
  File "configparser.py", line 895, in set
  File "configparser.py", line 402, in before_set
ValueError: invalid interpolation syntax in '...<cookie>

I solved the problem by disabling interpolation (the ability to use formatting with %s and so on) in the configparser's in jwt_tool.py like so :

line 93 -> config = configparser.ConfigParser(allow_no_value=True,strict=False, interpolation=None)
line 1891 -> config = configparser.ConfigParser(strict=False, interpolation=None)

Based on : https://stackoverflow.com/questions/2537929/is-it-possible-to-temporarily-disable-pythons-string-interpolation

I am not sure interpolation is intended as a use case for this program and i suggest to make this as a permanent solution (could even raise security acutally).

Thanks for the great tool !

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant