Skip to content

Commit

Permalink
Merge pull request #236 from nodtem66/patch-211
Browse files Browse the repository at this point in the history
Improve JWT RegExp
  • Loading branch information
piatrashkakanstantinass authored Dec 3, 2021
2 parents d5ea9ce + 6cc0765 commit 1e843aa
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pywhat/Data/regex.json
Original file line number Diff line number Diff line change
Expand Up @@ -2367,7 +2367,7 @@
},
{
"Name": "JSON Web Token (JWT)",
"Regex": "(?i)^((?=.*[a-z])(?=.*[0-9])(?:[a-z0-9_=]+\\.){2}(?:[a-z0-9_\\-\\+\\/=]*))$",
"Regex": "(?i)^((?=eyJ)(?:[a-z0-9_=\\-]{17,})\\.(?=e)(?:[a-z0-9_=\\-]{2,})\\.(?:[a-z0-9_=\\-]{43,}))$",
"plural_name": false,
"Description": null,
"Rarity": 0.2,
Expand All @@ -2380,9 +2380,16 @@
],
"Examples": {
"Valid": [
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"eyJhbGciOiJIUzI1NiJ9.e30.4E_Bsx-pJi3kOW9wVXN8CgbATwP09D9V5gxh9-9zSZ0",
"eyJhbGciOiJIUzM4NCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.PyaQAiuwn6CTGq4ZQCTbXIs4GnRT7bBBFohNBlNdwTJQvGEIxKjecJITFjaPuxE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