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

[SECURITY-20] Improve local file inclusion protections #13428

Merged
merged 1 commit into from Apr 19, 2017

Conversation

opengeek
Copy link
Member

What does it do?

This commit improves the LFI protections throughout the core to remove any sequence of 2 or more . characters regardless of the path delimiter that precedes or follows it.

Why is it needed?

The existing protections would not work on Windows platforms with backslash path delimiters.

Related issue(s)/PR(s)

N/A

The existing protections would not work on Windows platforms with backslash path delimiters. This commit improves the LFI protections throughout the core to remove any sequence of 2 or more `.` characters regardless of the path delimiter that precedes or follows it.
@opengeek opengeek added area-security proposal Proposal about improvement aka RFC. Need to be discussed before start implementation. labels Apr 19, 2017
@opengeek opengeek added this to the 2.5.7 milestone Apr 19, 2017
@opengeek opengeek changed the title Improve local file inclusion protections [SECURITY-20] Improve local file inclusion protections Apr 19, 2017
@Mark-H Mark-H self-assigned this Apr 19, 2017
@Mark-H Mark-H merged commit e873488 into modxcms:2.5.x Apr 19, 2017
@AgelxNash
Copy link
Contributor

💩

$name = './index.php';
$directory = 'public/files/.';

/var/www/example.com/public/files/../index.php

@Mark-H
Copy link
Collaborator

Mark-H commented Jul 17, 2017

@AgelxNash: security@modx.com please

@opengeek opengeek deleted the lfi-improvement branch December 17, 2019 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-security proposal Proposal about improvement aka RFC. Need to be discussed before start implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants