Open admarrs opened 3 years ago
After further investigation, the regex used to extract the username & password from the decoded token doesn't like symbols in the password.
So I'd suggest an update to the Test drive to add the -n flag to pass generate to exclude symbols from the password:
pass generate -n site/local/admin
With that change the Test drive worked as described.
Thanks for this - I've made the change you suggested to the documentation.
I'm still puzzled as to why this occurred. If you have a moment, could you paste me a bit more detail, or a password that causes the issue?
The generated password that caused the problem was <d"DWP+"g/egZyR:`rYQ#QiXv
From the repl
site > clj
Clojure 1.10.1
user=> (re-matches #"([^:]*):([^:]*)" 'admin:<d"DWP+"g/egZyR:`rYQ#QiXv')
Syntax error reading source at (REPL:2:55).
Invalid token: g/egZyR:
user/rYQ#QiXv'
Syntax error reading source at (REPL:2:66).
Unmatched delimiter: )
user=>
Thanks very much for sending this in, it's really helpful and I was able to spot the bug straight-away. The regex is wrong, it should almost certainly be ([^:]*):(.*)
to allow passwords to have colons. If you don't mind, I'll re-open this issue in lieu of fixing this (and testing).
Note, when fixing this bug, remove the -n
flag to the pass generate
flag, as it won't be necessary.
Hi , i done all steps but i get this error;
Not Found Error
Unauthorized Error
Hi, we're currently rewriting all the authn/authz parts of site so this is problem won't exist in a few weeks when that gets merged but for now you can do one of the following things to solve this:
Hopefully that helps
I tried but does not change . Also can't find the opt/login-page.
Following the Test drive I get the following when trying to get-token for the admin user
Looking at the log output it looks like the username being passed to juxt.pass.alpha.authentication/lookup-user is nil