Skip to content

Remove trailing forward slash #4

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sdushantha
Copy link

Many users may copy the URL from their web browser which results in the URL containing a trailing forward slash. If this is included in the URL when making the request to the API endpoints the correct data wont be returned.

Before

$ ruby exploit.rb http://example.com/
exploit.rb:71:in `parse_users': undefined method `each' for nil (NoMethodError)

  data.each do |user|
      ^^^^^
        from exploit.rb:85:in `display_users'
        from exploit.rb:135:in `<main>'

After

$ ruby exploit.rb http://example.com/
Users
[649] bob (bob) - [email protected] - Super Users

<SNIP>

Many users may copy the URL from their web browser which results in the
URL containing a trailing forwardslash. If this is included in the URL when
making the request to the API endpoints the correct data wont be
returned.
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

Successfully merging this pull request may close these issues.

1 participant