Skip to content

Commit

Permalink
fix #40: print Error when value is not str type
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieu Bouamama committed Jan 6, 2021
1 parent f07aed6 commit f7a8fc2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion myjwt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""autogenerated"""
__version__ = "1.3.0"
__commit__ = "8123c371ec5cc36a83511d343a6d42dba484785a"
__commit__ = "f07aed632c8138e554bd6f1f6f60ac62346dab24"
3 changes: 2 additions & 1 deletion myjwt/variables.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
All Environment variables
"""
import click
from questionary import Separator

NOT_VALID_JWT = "Enter a valid JWT!!!"
Expand All @@ -12,7 +13,7 @@
VALID_DATA = "Enter a Valid data, Format: username=admin"
VALID_HEADER = "Enter a Valid header, Format: username=admin"
VALID_PAYLOAD_JSON = "Not a valid format for payload, send a json."
NEW_JWT = "new JWT: "
NEW_JWT = click.style("new JWT: ", fg='green')
VALID_SIGNATURE = "Valid Signature!!"
INVALID_SIGNATURE = "Incorrect signature!!"
# User interface
Expand Down
8 changes: 4 additions & 4 deletions myjwt/vulnerabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,10 @@ def print_decoded(jwt: str):
click.echo("Header: ")
for key in jwt_json[HEADER].keys():
click.echo(
key
str(key)
+ " = "
+ (
jwt_json[HEADER][key]
str(jwt_json[HEADER][key])
if jwt_json[HEADER][key] is not None
else "null"
),
Expand All @@ -213,10 +213,10 @@ def print_decoded(jwt: str):
click.echo("Payload: ")
for key in jwt_json[PAYLOAD].keys():
click.echo(
key
str(key)
+ " = "
+ (
jwt_json[PAYLOAD][key]
str(jwt_json[PAYLOAD][key])
if jwt_json[PAYLOAD][key] is not None
else "null"
),
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ exrex==0.10.5
pyOpenSSL==20.0.1
questionary==1.9.0
requests==2.25.1
colorama==0.4.4

0 comments on commit f7a8fc2

Please sign in to comment.