-
-
Notifications
You must be signed in to change notification settings - Fork 16.1k
Fix absolute paths and tests #1356
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
Conversation
JamesCullum
commented
Mar 26, 2020
…directories Signed-off-by: JamesCullum <JamesCullum@users.noreply.github.com>
Signed-off-by: JamesCullum <JamesCullum@users.noreply.github.com>
- Fixed SSTI test, which failed because it didnÄt trigger the serverside scoring - Fixed timing issues in registerSpec and contactSpec, where the XSS didn't work if the browser was too fast - Added code way to simulate a proxy environment ina subfolder. Run via "node test/e2eSubfolder.js" - Added e2e test for subfolder. Run via "npm run e2e -- subfolder" - Added e2e test for subfolder to travis Signed-off-by: JamesCullum <JamesCullum@users.noreply.github.com>
Signed-off-by: JamesCullum <JamesCullum@users.noreply.github.com>
Signed-off-by: JuiceShopBot <61591748+JuiceShopBot@users.noreply.github.com>
|
Travis doesn't like me apparently - can you check if it was paused or sth? |
|
I pushed a new branch with all changes from your PR, let's see how far Travis gets with that... https://travis-ci.org/github/bkimminich/juice-shop/builds/667464194 |
|
CI looks good on that branch! I'll merge it and close this PR instead, because I fixed one small integration test expectation there before everything passed. |
|
Thanks a lot - saw the integration one failing as well. |
|
Just one thing I noticed: |
|
Correct, that's why all usages for this environment variable have a default set like |
|
Understood, but if you want to run the server in a subdirectory you must pass in the subsirectory as that variable yourself. I'm essentially asking for the documentation only. |
|
I see what you mean, thanks for elaboration. I think it would be the best to document that if you want to run it via reverse proxy in a subfolder, you need to change the baseurl in the subfolder protractor file and launch the subfolder script. Everything should then work as in the test and there is no need to manage additional variables. The environment variable was just used to not have to read the baseurl multiple times. If you want o have it more verbose, we can just use that snippet multiple times (or have a small include for it for example). So instead of redirecting http://example.com/subfolder -> localhost:3000, they should redirect to localhost:3001/subfolder What do you think? |
|
Hm, can't they just specify the name of the subdirectory in that environment variable and that'd be it? |
|
What I mean: When running in "production" the Juice Shop can neither rely on that new |
|
I added a config parameter |
(for bkimminich/juice-shop#1356)
|
I thought the two files were provided in a production - if not, it's a different situation to me. Your documentation sounds good to me. I didn't test it using just the environment variable, just using the e2e file. But as it just runs the proxy and sets the environment variable it should be fine I guess? |
