File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ const Transform = require('stream').Transform
5
5
6
6
const SPEC_ALGORITHMS = [ 'sha256' , 'sha384' , 'sha512' ]
7
7
8
- const BASE64_REGEX = / [ a - z 0 - 9 + / ] + (?: = ? = ? ) / i
8
+ const BASE64_REGEX = / ^ [ a - z 0 - 9 + / ] + (?: = ? = ? ) $ / i
9
9
const SRI_REGEX = / ^ ( [ ^ - ] + ) - ( [ ^ ? ] + ) ( [ ? \S * ] * ) $ /
10
10
const STRICT_SRI_REGEX = / ^ ( [ ^ - ] + ) - ( [ A - Z a - z 0 - 9 + / ] + (?: = ? = ? ) ) ( [ ? \x21 - \x7E ] * ) $ /
11
- const VCHAR_REGEX = / [ \x21 - \x7E ] + /
11
+ const VCHAR_REGEX = / ^ [ \x21 - \x7E ] + $ /
12
12
13
13
class IntegrityMetadata {
14
14
constructor ( metadata , opts ) {
@@ -75,7 +75,7 @@ class Integrity {
75
75
const other = typeof integrity === 'string'
76
76
? integrity
77
77
: stringify ( integrity , opts )
78
- return parse ( `${ this . toString ( ) } ${ other } ` , opts )
78
+ return parse ( `${ this . toString ( opts ) } ${ other } ` , opts )
79
79
}
80
80
}
81
81
You can’t perform that action at this time.
0 commit comments