File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ class PreparedStatement extends EventEmitter {
9191 */
9292
9393 input ( name , type ) {
94- if ( ( / ( - - | | \/ \* | \* \/ | ' ) / ) . test ( name ) ) {
94+ if ( / - - | | \/ \* | \* \/ | ' / . test ( name ) ) {
9595 throw new PreparedStatementError ( `SQL injection warning for param '${ name } '` , 'EINJECT' )
9696 }
9797
@@ -144,7 +144,7 @@ class PreparedStatement extends EventEmitter {
144144 */
145145
146146 output ( name , type ) {
147- if ( / ( - - | | \/ \* | \* \/ | ' ) / . test ( name ) ) {
147+ if ( / - - | | \/ \* | \* \/ | ' / . test ( name ) ) {
148148 throw new PreparedStatementError ( `SQL injection warning for param '${ name } '` , 'EINJECT' )
149149 }
150150
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ class Request extends EventEmitter {
107107 */
108108
109109 input ( name , type , value ) {
110- if ( ( / ( - - | | \/ \* | \* \/ | ' ) / ) . test ( name ) ) {
110+ if ( / - - | | \/ \* | \* \/ | ' / . test ( name ) ) {
111111 throw new RequestError ( `SQL injection warning for param '${ name } '` , 'EINJECT' )
112112 }
113113
@@ -170,7 +170,7 @@ class Request extends EventEmitter {
170170 output ( name , type , value ) {
171171 if ( ! type ) { type = TYPES . NVarChar }
172172
173- if ( ( / ( - - | | \/ \* | \* \/ | ' ) / ) . test ( name ) ) {
173+ if ( / - - | | \/ \* | \* \/ | ' / . test ( name ) ) {
174174 throw new RequestError ( `SQL injection warning for param '${ name } '` , 'EINJECT' )
175175 }
176176
You can’t perform that action at this time.
0 commit comments