Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am passing some xss scripts through my story file which breaks the reports. do you have any work around for that. #1316

Closed
murthysp opened this issue Jul 24, 2018 · 2 comments
Labels

Comments

@murthysp
Copy link

No description provided.

@murthysp murthysp changed the title I am passing some xss data through my story file which breaks the reports. do you have any work around for that. I am passing some xss scripts through my story file which breaks the reports. do you have any work around for that. Jul 24, 2018
@simzar
Copy link

simzar commented Jul 25, 2018

I have solved it by creating a separate properties file XSS-examples.properties, remove XSS scripts from My-Scenario.story examples section and add references to properties:

Examples:
|name   |
|name1  |

Whereas they get loaded in the definitions file
someSteps.setName(properties.getProperty("name1"))

And the properties file looks like

name1=<SCRIPT SRC=http://xss.rocks/xss.js></SCRIPT>
name2=<IMG SRC=javascript:alert('XSS')>
name3=<IMG SRC=`javascript:alert("RSnake says, 'XSS'")`>
<...>

This is not a pretty way, but it helps you to achieve the result - test the XSS injection and successfully generate a report.

@wakaleo
Copy link
Member

wakaleo commented Jul 25, 2018

The Serenity reports are not really designed to be XSS-proof, and there is only so much escaping that can be done. Feel free to take a look at the Freemarker templates if you can find a tweak that would work better for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants