-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Fix absolute paths for serveIndex plugin #1353
Conversation
Travis CI test is stuck - maybe you can restart it or skip that test |
Restarted the stuck build. Hopefully it behaves this time 😅 |
That one Mac one doesn't want to run - I believe that's why there just was a maintenance of that environment. |
There seem to be some general issues with OSX builds at the moment... In another build on |
Mac builds seem to work again, I'm restarting the job for this PR: https://travis-ci.org/github/bkimminich/juice-shop/builds/665040311 |
Or did it? :P |
1 of 3 passed at least... |
Initial run 2/3 passed - do we know when the issue is fixed on their side? |
Can you try again? |
Please rebase with |
Also I've found at least one additional link that's still pointing to an absolute path: There might be more and our test suites won't help us find any broken ones, because it doesn't run the server in a subdirectory. Meaning this is a manual testing exercise that'd need to happen before this gets merged. |
Another candidate? (...and I actually have no time to chase those down...) Please do not remove the "🚧" until you are sure to have found all instances where this would cause issues for instances in subdirectories. The FTP folder, promotion video, profile etc. all need to be looked over thoroughly. |
No, all references with hostServer beforehand work, as it is replaced with So we need to have tests for this or how do you want to make sure we found everything? As it is a non-essential feature used by not many people I would fix it as we go. |
I don't think this really warrants effortful test automation, so I'd just rely on you having clicked on every link in the entire application... 😆👍 |
The promotion video screen pulls the video for example from another URL, not sure that'll still work in a subdirectory. |
…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>
Switched to |
I've fixed it and am currently running tests. |
If you did to |
Signed-off-by: JamesCullum <JamesCullum@users.noreply.github.com>
Full changes from commit:
Travis appears to be stuck on this PR and doesn't recheck the newest versions |
Can you rebase again, then Travis-CI should realize it has a job to do... 👷 |
As Travis didn't trigger for the last changes or rebases as well, I'm not positive on it. Will try a rebase and otherwise try a new PR. |
Before: Running juiceshop ina subdirectory broke the links to files that are interacted with using the serve-index package (eg /ftp), as it uses an absolute link. From domain.com/subdir/ftp it will link to domain.com/ftp (which is not available).
Now: All links are rewritten to be relative, so that even if it runs in a subfolder it will continue to work.
There should be no impact for projects in the root directory.
Attribution goes again to Panasonic Information Systems Company Europe GmbH