本文介绍了“无法识别的内容安全策略指令" reflected-xss"通过chromedriver生成的与PayPal相关的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些原因,我们的持续集成测试自2017年2月7日(星期二)以来失败.

For some reasons our continuous integration tests have failed since 7 feb 2017(Tue).

通过 https:生成日志: //github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#user-content-log-entry-json-object

我用过铬56.0.2924.87-1
ChromeDriver 2.25

I have used chromium 56.0.2924.87-1
ChromeDriver 2.25

            [1] => Array
                (
                    [level] => SEVERE
                    [message] => https://www.sandbox.paypal.com/signin/inject/?stsRedirectUri=https%3A%2F%2Fwww.sandbox.paypal.com%2Fcheckoutnow%2F2&country.x=US&locale.x=en_US&returnUri=https%3A%2F%2Fwww.sandbox.paypal.com%2Fcheckoutnow%2F2&state=%3Fflow%3D1-P%26token%3DEC-5N74679848773161E%26useraction%3Dcommit&flowId=EC-5N74679848773161E&correlationId=c2516170ad8f6&flowContextData=d-T_d1elACFNiXhhfk4mio6Sh6WWFGmbOuXXROs9tP7rjABQARmehjUHUAKHiCRWrplD4ufu0B8WDTklRnEubKC-FY90pbF_e3y0S5fNbCjSjKyO8meAs7IsOC0&rememberMe=true - Unrecognized Content-Security-Policy directive 'reflected-xss'.

                    [timestamp] => 1486491911470
                )

            [2] => Array
                (
                    [level] => SEVERE
                    [message] => about:blank - Unrecognized Content-Security-Policy directive 'reflected-xss'.

                    [timestamp] => 1486491911554
                )

            [3] => Array
                (
                    [level] => SEVERE
                    [message] => about:blank - Unrecognized Content-Security-Policy directive 'reflected-xss'.

                    [timestamp] => 1486491911554
                )

            [4] => Array
                (
                    [level] => SEVERE
                    [message] => https://www.paypalobjects.com/web/res/069/67a0e1f4befbbcfdd8dc1dfb1f35b/js/app.js 47 Unrecognized Content-Security-Policy directive 'reflected-xss'.

                    [timestamp] => 1486491911899
                )

            [5] => Array
                (
                    [level] => SEVERE
                    [message] => https://www.paypalobjects.com/web/res/069/67a0e1f4befbbcfdd8dc1dfb1f35b/js/app.js 47 Unrecognized Content-Security-Policy directive 'reflected-xss'.

                    [timestamp] => 1486491911899
                )

我可以自己解决问题吗?

Can I fix the problem on my side ?

推荐答案

Chrome在版本56和更高版本中已弃用此CSP

Chrome has deprecated this CSP in versions 56 and newer

https://www.chromestatus.com/feature/5769374145183744

正确地使用标头取决于您实际访问的网站,因此您不能从客户端测试中控制这些内容.

It would be up to the site you're actually visiting to apply headers correctly, so not something you can control from your client side tests.

这篇关于“无法识别的内容安全策略指令" reflected-xss"通过chromedriver生成的与PayPal相关的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 05:51