Raise if path isn't a string
All threads resolved!
All threads resolved!
Compare changes
Files
4- Dominic Couture authored
@@ -87,7 +87,6 @@ def validate
@@ -87,7 +87,6 @@ def validate
Related to https://gitlab.com/gitlab-org/gitlab/-/issues/371994
Kicking off a quick MR to see if specs fail. I will clean it up with specs depending on how much stuff breaks (if at all!)
N/A
From the rails console
[1] pry(main)> attack = [ ".." , "..", "..", "..", "..", "..", "..", "..", "..", "..", "etc", "passwd"]
=> ["..", "..", "..", "..", "..", "..", "..", "..", "..", "..", "etc", "passwd"]
[2] pry(main)> Gitlab::Utils.check_path_traversal! attack
Gitlab::Utils::PathTraversalAttackError: Invalid path
from /home/dcouture/gdk/canonical/gitlab/lib/gitlab/utils.rb:20:in `check_path_traversal!'
Previously this did not raise
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.