eggjs / egg-security

Security plugin for egg, force performance too.
MIT License
238 stars 43 forks source link

utils (isSafeDomain): Use `matcher` to check for a wild character of a domain #42

Closed ghost closed 6 years ago

ghost commented 6 years ago

1) Ref: https://github.com/eggjs/egg-security/pull/26 2) Add more unit tests for that.

Notice:Plz run npm i to install matcher first before running!

ghost commented 6 years ago

/cc:@popomore

codecov[bot] commented 6 years ago

Codecov Report

Merging #42 into master will increase coverage by 0.03%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #42      +/-   ##
==========================================
+ Coverage   95.83%   95.86%   +0.03%     
==========================================
  Files          30       30              
  Lines         480      484       +4     
==========================================
+ Hits          460      464       +4     
  Misses         20       20
Impacted Files Coverage Δ
lib/utils.js 80% <100%> (+1.42%) :arrow_up:

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 a7035cf...6d547ae. Read the comment docs.