Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Security 对URI参数进行编码_Security_Http_Angularjs_Url Encoding_Uriencoding - Fatal编程技术网

Security 对URI参数进行编码

Security 对URI参数进行编码,security,http,angularjs,url-encoding,uriencoding,Security,Http,Angularjs,Url Encoding,Uriencoding,我们的一些GET请求将参数作为请求参数传递到URI和中。 因此,在firebug中,您会在URI中看到相同的参数,在请求的params选项卡上也会看到相同的参数 当需要对参数值进行编码时,例如它是%,我在URI中看到它被编码为%25,但在params选项卡上没有看到它被编码 请求是使用Angular发出的 我想知道的是,只有当URI中的参数需要编码时,它才需要编码吗?还是我需要在这里保持一致 谢谢您应该使用encodeURIComponent(url\u或\u参数) 见:

我们的一些GET请求将参数作为请求参数传递到URI和中。 因此,在firebug中,您会在URI中看到相同的参数,在请求的params选项卡上也会看到相同的参数

当需要对参数值进行编码时,例如它是
%
,我在URI中看到它被编码为
%25
,但在params选项卡上没有看到它被编码

请求是使用Angular发出的

我想知道的是,只有当URI中的参数需要编码时,它才需要编码吗?还是我需要在这里保持一致


谢谢

您应该使用
encodeURIComponent(url\u或\u参数)

见: