File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ class PreparedStatement extends EventEmitter {
91
91
*/
92
92
93
93
input ( name , type ) {
94
- if ( ( / ( - - | | \/ \* | \* \/ | ' ) / ) . test ( name ) ) {
94
+ if ( / ( - - | | \/ \* | \* \/ | ' ) / . test ( name ) ) {
95
95
throw new PreparedStatementError ( `SQL injection warning for param '${ name } '` , 'EINJECT' )
96
96
}
97
97
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ class Request extends EventEmitter {
107
107
*/
108
108
109
109
input ( name , type , value ) {
110
- if ( ( / ( - - | | \/ \* | \* \/ | ' ) / ) . test ( name ) ) {
110
+ if ( / ( - - | | \/ \* | \* \/ | ' ) / . test ( name ) ) {
111
111
throw new RequestError ( `SQL injection warning for param '${ name } '` , 'EINJECT' )
112
112
}
113
113
@@ -170,7 +170,7 @@ class Request extends EventEmitter {
170
170
output ( name , type , value ) {
171
171
if ( ! type ) { type = TYPES . NVarChar }
172
172
173
- if ( ( / ( - - | | \/ \* | \* \/ | ' ) / ) . test ( name ) ) {
173
+ if ( / ( - - | | \/ \* | \* \/ | ' ) / . test ( name ) ) {
174
174
throw new RequestError ( `SQL injection warning for param '${ name } '` , 'EINJECT' )
175
175
}
176
176
You can’t perform that action at this time.
0 commit comments