Skip to content

Conversation

@dimitriharding
Copy link
Contributor

@dimitriharding dimitriharding commented Jul 28, 2022

Resolves Issue #366

Check if the relative path is specified in require_uri and return 403 before sending the request to be resolved by the server.

 if ($request_uri ~ "\.\./"){
  return 403;
 }

http://localhost:8080/?../../../../../../../../etc/hosts -> 403 forbidden
http://localhost:8080/?../../../../../../../../etc/passwd -> 403 forbidden

403-vrt

This will prevent any directory traversal attempts.

Copy link
Member

@pashidlos pashidlos left a comment

Choose a reason for hiding this comment

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

LGTM!

@pashidlos
Copy link
Member

@dimitriharding thank you for contribution!

@pashidlos pashidlos closed this Jul 29, 2022
@pashidlos pashidlos reopened this Jul 29, 2022
@pashidlos pashidlos merged commit 1a63877 into Visual-Regression-Tracker:master Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Able to Access Unintended Local File on VRT Frontend Server using Directory Traversal

2 participants