Skip to content
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

Bug - A second slash is added to the url of a discovered directory/file when clicked/opened #442

Closed
SiddharthBharadwaj opened this issue Aug 16, 2021 · 2 comments

Comments

@SiddharthBharadwaj
Copy link
Contributor

Issue Summary

When the user clicks on the any discovered directory or file, a second slash is added to the url. This causes issues in some cases or websites.

Steps to Reproduce

  1. Open scan summary of any target
  2. Visit the Directories tab
  3. Click on any directory/url
  4. Notice the url

eg. If the target is example.com and a directory /files is found. The clicking on the link should open https://example.com/file but it opens https://example.com//file

Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?

  • I have confirmed that this issue can be reproduced as described on a latest version/pull of reNgine: (yes / no): yes
@yogeshojha
Copy link
Owner

Hi Thanks for reporting, I can help you resolve this, are you willing to send a Pull Request, that way you can also get involved in Open Source Contributing.

This is where the problem is.

Most probably in these two

html_treeview += `<li class="file-tree-empty-folder"><a href="` + main_url + path + `" target="_blank">` + path + ` (` + contentlength.toString() + ` Kb)</a></li>`;

and

html_treeview += `<li id='filePath'><a href="` + main_url + path + `" target="_blank">` + path + ` (` + contentlength.toString() + ` Kb)</a></li>`;

@SiddharthBharadwaj
Copy link
Contributor Author

SiddharthBharadwaj commented Aug 16, 2021

Created a PR #443. Please check and let me know if everything seems fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants