File tree 2 files changed +4
-4
lines changed
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 {
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
@@ -144,7 +144,7 @@ class PreparedStatement extends EventEmitter {
144
144
*/
145
145
146
146
output ( name , type ) {
147
- if ( / ( - - | | \/ \* | \* \/ | ' ) / . test ( name ) ) {
147
+ if ( / - - | | \/ \* | \* \/ | ' / . test ( name ) ) {
148
148
throw new PreparedStatementError ( `SQL injection warning for param '${ name } '` , 'EINJECT' )
149
149
}
150
150
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