@@ -192,14 +192,14 @@ describe('Unit: Mysql extension', function () {
192
192
expect ( queryStub . calledThrice ) . to . be . true ;
193
193
expect ( queryStub . args [ 0 ] [ 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 ; $ / ) ;
194
194
expect ( queryStub . args [ 1 ] [ 0 ] ) . to . equal ( 'SET old_passwords = 0;' ) ;
195
- expect ( queryStub . args [ 2 ] [ 0 ] ) . to . match ( / ^ S E T P A S S W O R D F O R ' g h o s t - [ 0 - 9 ] { 1 , 4 } ' @ ' l o c a l h o s t ' = P A S S W O R D \( ' [ 0 - 9 A - F a - f ] * ' \) ; $ / ) ;
195
+ expect ( queryStub . args [ 2 ] [ 0 ] ) . to . match ( / ^ S E T P A S S W O R D F O R ' g h o s t - [ 0 - 9 ] { 1 , 4 } ' @ ' l o c a l h o s t ' = P A S S W O R D \( ' [ 0 - 9 A - Z a - z ~ ! @ # $ % ] * ' \) ; $ / ) ;
196
196
expect ( logStub . calledThrice ) . to . be . true ;
197
197
expect ( logStub . args [ 0 ] [ 0 ] ) . to . match ( / c r e a t e d n e w u s e r / ) ;
198
198
expect ( logStub . args [ 1 ] [ 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 [ 2 ] [ 0 ] ) . to . match ( / s u c c e s s f u l l y c r e a t e d p a s s w o r d f o r u s e r / ) ;
200
200
expect ( ctx . mysql ) . to . exist ;
201
201
expect ( ctx . mysql . username ) . to . match ( / ^ g h o s t - [ 0 - 9 ] { 1 , 4 } $ / ) ;
202
- expect ( ctx . mysql . password ) . to . match ( / ^ [ 0 - 9 A - F a - f ] * $ / ) ;
202
+ expect ( ctx . mysql . password ) . to . match ( / ^ [ 0 - 9 A - Z a - z ~ ! @ # $ % ] * $ / ) ;
203
203
} ) ;
204
204
} ) ;
205
205
@@ -219,15 +219,15 @@ describe('Unit: Mysql extension', function () {
219
219
expect ( queryStub . args [ 0 ] [ 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 ; $ / ) ;
220
220
expect ( queryStub . args [ 1 ] [ 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 ; $ / ) ;
221
221
expect ( queryStub . args [ 2 ] [ 0 ] ) . to . equal ( 'SET old_passwords = 0;' ) ;
222
- expect ( queryStub . args [ 3 ] [ 0 ] ) . to . match ( / ^ S E T P A S S W O R D F O R ' g h o s t - [ 0 - 9 ] { 1 , 4 } ' @ ' l o c a l h o s t ' = P A S S W O R D \( ' [ 0 - 9 A - F a - f ] * ' \) ; $ / ) ;
222
+ expect ( queryStub . args [ 3 ] [ 0 ] ) . to . match ( / ^ S E T P A S S W O R D F O R ' g h o s t - [ 0 - 9 ] { 1 , 4 } ' @ ' l o c a l h o s t ' = P A S S W O R D \( ' [ 0 - 9 A - Z a - z ~ ! @ # $ % ] * ' \) ; $ / ) ;
223
223
expect ( logStub . callCount ) . to . equal ( 4 ) ;
224
224
expect ( logStub . args [ 0 ] [ 0 ] ) . to . match ( / u s e r e x i s t s , r e - t r y i n g u s e r c r e a t i o n / ) ;
225
225
expect ( logStub . args [ 1 ] [ 0 ] ) . to . match ( / c r e a t e d n e w u s e r / ) ;
226
226
expect ( logStub . args [ 2 ] [ 0 ] ) . to . match ( / d i s a b l e d o l d _ p a s s w o r d / ) ;
227
227
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 p a s s w o r d f o r u s e r / ) ;
228
228
expect ( ctx . mysql ) . to . exist ;
229
229
expect ( ctx . mysql . username ) . to . match ( / ^ g h o s t - [ 0 - 9 ] { 1 , 4 } $ / ) ;
230
- expect ( ctx . mysql . password ) . to . match ( / ^ [ 0 - 9 A - F a - f ] * $ / ) ;
230
+ expect ( ctx . mysql . password ) . to . match ( / ^ [ 0 - 9 A - Z a - z ~ ! @ # $ % ] * $ / ) ;
231
231
} ) ;
232
232
} ) ;
233
233
0 commit comments