Skip to content

Disallow path traversals in file view - #14342

Merged
DeepDiver1975 merged 2 commits into
masterfrom
disallow-path-traversals-in-file-view
Feb 19, 2015
Merged

DeepDiver1975 merged 2 commits into
masterfrom
disallow-path-traversals-in-file-view

Conversation

@LukasReschke

Copy link
Copy Markdown
Contributor

This prevents a misusage of \OC\Files\View by calling it with user-supplied input. In such cases an exception is now thrown.

Also I added some basic PHPDocs to that class as my IDE was crying "FIX ME" ;-)

cc @icewind1991 Please review

@ghost

ghost commented Feb 18, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/9731/
Test PASSed.

Comment thread lib/private/files/view.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

missing type

@icewind1991

Copy link
Copy Markdown
Contributor

Makes sense 👍

This prevents a misusage of \OC\Files\View by calling it with user-supplied input. In such cases an exception is now thrown.
@LukasReschke
LukasReschke force-pushed the disallow-path-traversals-in-file-view branch from dad22ce to 46ca0fa Compare February 18, 2015 17:17
@LukasReschke

Copy link
Copy Markdown
Contributor Author

@nickvergessen Adjusted.

@ghost

ghost commented Feb 18, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/9740/
Test PASSed.

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 27 new issues, 2 updated code elements

@DeepDiver1975 DeepDiver1975 added this to the 8.1-next milestone Feb 19, 2015
@DeepDiver1975

Copy link
Copy Markdown
Contributor

👍

DeepDiver1975 added a commit that referenced this pull request Feb 19, 2015
…ile-view

Disallow path traversals in file view
@DeepDiver1975
DeepDiver1975 merged commit 84eb00e into master Feb 19, 2015
@DeepDiver1975
DeepDiver1975 deleted the disallow-path-traversals-in-file-view branch February 19, 2015 09:27
@DeepDiver1975

Copy link
Copy Markdown
Contributor

@LukasReschke I assume we want this on all stable branches?

@LukasReschke

Copy link
Copy Markdown
Contributor Author

Not quite sure about this as it is "just" an hardening and you never know which third-party apps rely on which behaviour.

Our shipped apps should work okay though.

I'd say we keep this for 8.1 for now. - With a 3 month release schedule this will reach the users anyways soon :)

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants