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

Improve reliability of the test server #6600

Merged
merged 1 commit into from
Nov 11, 2015

Conversation

Rob--W
Copy link
Member

@Rob--W Rob--W commented Nov 6, 2015

  • replace // with / (otherwise http://localhost:8888// links to e.g. http://src/ instead of http://localhost:8888/src).
  • Solve XSS issue (file names should be sanitized, not output as-is).
  • Prevent server from crashing if there is a stat error (e.g. permission error or file not found (e.g. broken symlink)).

// Escape untrusted input so that it can safely be used in a HTML response
// in HTML and in HTML attributes.
return untrusted
.replace(/&/g, '&ampl;')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'&'

- replace // with /
  (otherwise http://localhost:8888// links to e.g. http://src/ instead
   of http://localhost:8888/src).

- Solve XSS issue (file names should be sanitized, not output as-is).

- Prevent server from crashing if there is a stat error (e.g. permission
  error or file not found (e.g. broken symlink)).
yurydelendik added a commit that referenced this pull request Nov 11, 2015
Improve reliability of the test server
@yurydelendik yurydelendik merged commit 248e211 into mozilla:master Nov 11, 2015
@yurydelendik
Copy link
Contributor

Thank you for the patch

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

Successfully merging this pull request may close these issues.

3 participants