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

Fix url encode formatting #180

Merged
merged 3 commits into from
Jan 5, 2016
Merged

Conversation

fznoviar
Copy link
Contributor

No description provided.

@codecov-io
Copy link

Current coverage is 93.77%

Merging #180 into master will increase coverage by +0.08% as of e93cb21

@@            master    #180   diff @@
======================================
  Files           46      46       
  Stmts         1333    1349    +16
  Branches         0       0       
  Methods        226     227     +1
======================================
+ Hit           1249    1265    +16
  Partial          0       0       
  Missed          84      84       

Review entire Coverage Diff as of e93cb21


Uncovered Suggestions

  1. +1.18% via ...ports/CrawlerUrl.php#302...317
  2. +0.81% via ...onCheckerCommand.php#47...57
  3. +0.44% via .../CustomPresenter.php#17...22
  4. See 7 more...

Powered by Codecov. Updated on successful CI builds.

if (strpos($url, 'http') === false) {
return $qMarkImplode;
}
return 'http://' . $qMarkImplode;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two rare vulnerabilities in this function

  1. If the https website don't redirect http to https then not found will be occured. I think, we must use the url's scheme instead of hardcoded with http://. _Currently I didn't find https websites which don't redirect _http* to https.*
  2. If there is 'http://' in query string which is not url encoded, then the query string will be altered. We don't want this to happen. e.g https://www.google.co.id/?q=https://suitmedia.com

Cause the two case are rare should I merge for now and create new issue for enhancement?

@scrutinizer-notifier
Copy link

The inspection completed: 2 new issues, 1 updated code elements

richan-fongdasen added a commit that referenced this pull request Jan 5, 2016
Fix url encode formatting, Fixes #179
@richan-fongdasen richan-fongdasen merged commit cec322c into suitmedia:master Jan 5, 2016
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.

5 participants