File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,15 +41,15 @@ const token68 = '([\\w.~+/-]+=*)'
4141/**
4242 * @see https://datatracker.ietf.org/doc/html/rfc7235#appendix-C
4343 */
44- const credentialsStrictRE = new RegExp ( `^${ authScheme } ${ token68 } $` , 'i ' )
44+ const credentialsStrictRE = new RegExp ( `^${ authScheme } ${ token68 } $` , 'iu ' )
4545
46- const credentialsLaxRE = new RegExp ( `^${ BWS } *${ authScheme } ${ BWS } +${ token68 } ${ BWS } *$` , 'i ' )
46+ const credentialsLaxRE = new RegExp ( `^${ BWS } *${ authScheme } ${ BWS } +${ token68 } ${ BWS } *$` , 'iu ' )
4747
4848/**
4949 * @see https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1
5050 */
5151// eslint-disable-next-line no-control-regex
52- const controlRE = / [ \x00 - \x1F \x7F ] /
52+ const controlRE = / [ \x00 - \x1F \x7F ] / u
5353
5454/**
5555 * RegExp for basic auth user/pass
@@ -59,7 +59,7 @@ const controlRE = /[\x00-\x1F\x7F]/
5959 * password = *TEXT
6060 */
6161
62- const userPassRE = / ^ ( [ ^ : ] * ) : ( .* ) $ /
62+ const userPassRE = / ^ ( [ ^ : ] * ) : ( .* ) $ / u
6363
6464/** @type {typeof import('./types/index').fastifyBasicAuth } */
6565async function fastifyBasicAuth ( fastify , opts ) {
You can’t perform that action at this time.
0 commit comments