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 checkHost for checking Origin header #1606

Merged
merged 2 commits into from
Dec 22, 2018

Conversation

3846masa
Copy link
Member

@3846masa 3846masa commented Dec 22, 2018

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

Yes

Motivation / Use-Case

Fixed #1604

checkHost add // to header value for parsing.

#1603 use checkHost to check Origin header.

However, Origin must start with scheme (MDN), so paring result will be incorrect.

(e.g. http://localhost:8080 -> //http://localhost:8080)

Breaking Changes

Additional Info

checkHost should allow urls with scheme
@jsf-clabot
Copy link

jsf-clabot commented Dec 22, 2018

CLA assistant check
All committers have signed the CLA.

@alexander-akait
Copy link
Member

@3846masa thanks for PR, please accept CLA

@3846masa
Copy link
Member Author

I signed.

@codecov
Copy link

codecov bot commented Dec 22, 2018

Codecov Report

Merging #1606 into master will increase coverage by 0.14%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1606      +/-   ##
==========================================
+ Coverage    74.1%   74.25%   +0.14%     
==========================================
  Files          10       10              
  Lines         672      672              
==========================================
+ Hits          498      499       +1     
+ Misses        174      173       -1
Impacted Files Coverage Δ
lib/Server.js 81.74% <100%> (+0.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff2874f...e614308. Read the comment docs.

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.

"Invalid Host/Origin Header" warning
3 participants