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

Bypass 1 #3

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index_site.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ <h2>Verify your age </h2>
getNonce(required_age, validity).then((nonce) => {
var dataStr =
"data:text/json;charset=utf-8," +
encodeURIComponent(JSON.stringify(nonce));
encodeURIComponent(JSON.stringify({...nonce, site:"test"}));
var downloadAnchorNode = document.createElement("a");
downloadAnchorNode.setAttribute("href", dataStr);
downloadAnchorNode.setAttribute("download", "nonce" + ".json");
Expand Down
3 changes: 2 additions & 1 deletion trust.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ def sign():
# Then checks whether the registered age is above the required age. If not, say it.
message = request.json
required_age = int(message["required_age"])
site = message["site"]
nonce = message["nonce"]
if registered_age < required_age:
if registered_age < required_age and site != "test":
return bytes(json.dumps({"user": 1, "majeur": 0}), ENCODING)

# Loads the parameters of the required trusted pary
Expand Down