简体   繁体   中英

Error : API break when values("=?", "nc") passes in stage where cloud armor rules are defined

My (node.js) API is working properly in localhost but when i sending some special values in stage (server side) where Google-cloud-armor rules are defined then some values ("nc","=?") are blocked and the warning is bad request 403, the content-type in response header is getting changed from “application/json” to “text/html”. enter image description here

your server is protected by Google-armor, where some rules are defined for sqli injection and many more, the value "nc" is blocked by the Google-armor because, it is a cross-platform command.netcat, there are many more which can be blocked by the armor. you can solve this by encrypting the value and pass the encrypted value and decrypt it on the server but this may lead to some sql injection, after decrypting you need to check the string for any kind of sql injection.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM