@@ -192,15 +192,15 @@ describe('Unit: Mysql extension', function () {
192
192
return instance . createUser ( ctx , { host : 'localhost' } ) . then ( ( ) => {
193
193
expect ( queryStub . calledThrice ) . to . be . true ;
194
194
expect ( queryStub . args [ 0 ] [ 0 ] ) . to . equal ( 'SET old_passwords = 0;' ) ;
195
- expect ( queryStub . args [ 1 ] [ 0 ] ) . to . match ( / ^ S E L E C T P A S S W O R D \( ' [ 0 - 9 A - F a - f ] * ' \) A S p a s s w o r d ; $ / ) ;
195
+ expect ( queryStub . args [ 1 ] [ 0 ] ) . to . match ( / ^ S E L E C T P A S S W O R D \( ' [ a - z A - Z 0 - 9 ! @ # $ % ^ & * ( ) + _ \- = } { [ \] | : ; " / ? . > < , ` ~ ] * ' \) A S p a s s w o r d ; $ / ) ;
196
196
expect ( queryStub . args [ 2 ] [ 0 ] ) . to . match ( / ^ C R E A T E U S E R ' g h o s t - [ 0 - 9 ] { 1 , 4 } ' @ ' l o c a l h o s t ' I D E N T I F I E D W I T H m y s q l _ n a t i v e _ p a s s w o r d A S ' \* [ 0 - 9 A - F ] * ' ; $ / ) ;
197
197
expect ( logStub . calledThrice ) . to . be . true ;
198
198
expect ( logStub . args [ 0 ] [ 0 ] ) . to . match ( / d i s a b l e d o l d _ p a s s w o r d / ) ;
199
199
expect ( logStub . args [ 1 ] [ 0 ] ) . to . match ( / c r e a t e d p a s s w o r d h a s h / ) ;
200
200
expect ( logStub . args [ 2 ] [ 0 ] ) . to . match ( / s u c c e s s f u l l y c r e a t e d n e w u s e r / ) ;
201
201
expect ( ctx . mysql ) . to . exist ;
202
202
expect ( ctx . mysql . username ) . to . match ( / ^ g h o s t - [ 0 - 9 ] { 1 , 4 } $ / ) ;
203
- expect ( ctx . mysql . password ) . to . match ( / ^ [ 0 - 9 A - F a - f ] * $ / ) ;
203
+ expect ( ctx . mysql . password ) . to . match ( / ^ [ a - z A - Z 0 - 9 ! @ # $ % ^ & * ( ) + _ \- = } { [ \] | : ; " / ? . > < , ` ~ ] * $ / ) ;
204
204
} ) ;
205
205
} ) ;
206
206
@@ -219,7 +219,7 @@ describe('Unit: Mysql extension', function () {
219
219
return instance . createUser ( ctx , { host : 'localhost' } ) . then ( ( ) => {
220
220
expect ( queryStub . callCount ) . to . equal ( 4 ) ;
221
221
expect ( queryStub . args [ 0 ] [ 0 ] ) . to . equal ( 'SET old_passwords = 0;' ) ;
222
- expect ( queryStub . args [ 1 ] [ 0 ] ) . to . match ( / ^ S E L E C T P A S S W O R D \( ' [ 0 - 9 A - F a - f ] * ' \) A S p a s s w o r d ; $ / ) ;
222
+ expect ( queryStub . args [ 1 ] [ 0 ] ) . to . match ( / ^ S E L E C T P A S S W O R D \( ' [ a - z A - Z 0 - 9 ! @ # $ % ^ & * ( ) + _ \- = } { [ \] | : ; " / ? . > < , ` ~ ] * ' \) A S p a s s w o r d ; $ / ) ;
223
223
expect ( queryStub . args [ 2 ] [ 0 ] ) . to . match ( / ^ C R E A T E U S E R ' g h o s t - [ 0 - 9 ] { 1 , 4 } ' @ ' l o c a l h o s t ' I D E N T I F I E D W I T H m y s q l _ n a t i v e _ p a s s w o r d A S ' \* [ 0 - 9 A - F ] * ' ; $ / ) ;
224
224
expect ( queryStub . args [ 3 ] [ 0 ] ) . to . match ( / ^ C R E A T E U S E R ' g h o s t - [ 0 - 9 ] { 1 , 4 } ' @ ' l o c a l h o s t ' I D E N T I F I E D W I T H m y s q l _ n a t i v e _ p a s s w o r d A S ' \* [ 0 - 9 A - F ] * ' ; $ / ) ;
225
225
expect ( logStub . callCount ) . to . equal ( 4 ) ;
@@ -229,7 +229,7 @@ describe('Unit: Mysql extension', function () {
229
229
expect ( logStub . args [ 3 ] [ 0 ] ) . to . match ( / s u c c e s s f u l l y c r e a t e d n e w u s e r / ) ;
230
230
expect ( ctx . mysql ) . to . exist ;
231
231
expect ( ctx . mysql . username ) . to . match ( / ^ g h o s t - [ 0 - 9 ] { 1 , 4 } $ / ) ;
232
- expect ( ctx . mysql . password ) . to . match ( / ^ [ 0 - 9 A - F a - f ] * $ / ) ;
232
+ expect ( ctx . mysql . password ) . to . match ( / ^ [ a - z A - Z 0 - 9 ! @ # $ % ^ & * ( ) + _ \- = } { [ \] | : ; " / ? . > < , ` ~ ] * $ / ) ;
233
233
} ) ;
234
234
} ) ;
235
235
@@ -249,7 +249,7 @@ describe('Unit: Mysql extension', function () {
249
249
expect ( error . message ) . to . match ( / C r e a t i n g n e w m y s q l u s e r e r r o r e d / ) ;
250
250
expect ( queryStub . callCount ) . to . equal ( 3 ) ;
251
251
expect ( queryStub . args [ 0 ] [ 0 ] ) . to . equal ( 'SET old_passwords = 0;' ) ;
252
- expect ( queryStub . args [ 1 ] [ 0 ] ) . to . match ( / ^ S E L E C T P A S S W O R D \( ' [ 0 - 9 A - F a - f ] * ' \) A S p a s s w o r d ; $ / ) ;
252
+ expect ( queryStub . args [ 1 ] [ 0 ] ) . to . match ( / ^ S E L E C T P A S S W O R D \( ' [ a - z A - Z 0 - 9 ! @ # $ % ^ & * ( ) + _ \- = } { [ \] | : ; " / ? . > < , ` ~ ] * ' \) A S p a s s w o r d ; $ / ) ;
253
253
expect ( queryStub . args [ 2 ] [ 0 ] ) . to . match ( / ^ C R E A T E U S E R ' g h o s t - [ 0 - 9 ] { 1 , 4 } ' @ ' l o c a l h o s t ' I D E N T I F I E D W I T H m y s q l _ n a t i v e _ p a s s w o r d A S ' \* [ 0 - 9 A - F ] * ' ; $ / ) ;
254
254
expect ( logStub . callCount ) . to . equal ( 3 ) ;
255
255
expect ( logStub . args [ 0 ] [ 0 ] ) . to . match ( / d i s a b l e d o l d _ p a s s w o r d / ) ;
0 commit comments