-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Basic Auth in URL escaping ? #4091
Comments
Can you attempt to call I want to see if this is isolated to the Also, it's hard to tell if this is the actual url it is visiting or if this is just Cypress escaping the characters when showing the text of the error messages. Could you run the following command to open Cypress and click on the failing test? Then please paste the logs here. This should log the actual url request that went out: DEBUG=cypress:server:request cypress open It should look something like this:
|
Some precisions : Using URLEncode Open a private window in firefox , put Open a private window in chrome , put When testing it on cypress : I haven't the warning anymore, but when i run the test, there's a 401 error |
I tried with the With cypress:server:request sending request as stream {
auth: {
username: 'userIssue',
password: '*Y7QcbKRcGKze%5C5d'
},
failOnStatusCode: true,
method: 'GET',
body: null,
headers: { accept: 'text/html,*/*', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36' },
gzip: false,
url: 'http://localhost/',
followRedirect: [Function],
strictSSL: false
} +0ms
cypress:server:request setting request jar cookies [] +131ms without cypress:server:request sending request as stream {
auth: {
username: 'userIssue',
password: '*Y7QcbKRcGKze%5C5d'
},
failOnStatusCode: true,
method: 'GET',
body: null,
headers: { accept: 'text/html,*/*', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36' },
gzip: false,
url: 'http://localhost/',
followRedirect: [Function],
strictSSL: false
} +0ms
cypress:server:request setting request jar cookies [] +87ms in both cases, the test give a 401 error When i doesn't urlencode the password, and try i get the cypress:server:request sending request as stream {
auth: null,
failOnStatusCode: true,
method: 'GET',
body: null,
headers: { accept: 'text/html,*/*', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36' },
gzip: false,
url: 'http://userissue/:*y7qcbkrcgkze/5d@localhost/',
followRedirect: [Function],
strictSSL: false
} +0ms |
I have the same problem, but in my case nothing helps, as the password ENDS with the '@' symbol. |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
Current behavior:
I can't test with basic authentication in URL because of some special character in password.
Steps to reproduce: (app code and test code)
Please see this example : http://github.com/spras/issue-cypress
There's a docker nginx config with basic authentication
two users:password are authorized:
when we test basic auth via browser it'ok.
when we test basic auth via curl it'ok, escaping the
*
and the\
of the password :are fine
It's perfectly fine
Doesn't work :
The text was updated successfully, but these errors were encountered: