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

Fix for #3068 (Windows Path Sanitation) #3071

Closed
wants to merge 2 commits into from
Closed

Fix for #3068 (Windows Path Sanitation) #3071

wants to merge 2 commits into from

Conversation

fourcube
Copy link

@fourcube fourcube commented Nov 7, 2014

Fixes #3068.

Make sure that the questionable path is prefixed with the base path. If it is not, it will be expanded from the root and prefixed with the base path.

@parkr
Copy link
Member

parkr commented Nov 7, 2014

This fix isn't safe. The point of this method is to make sure the base path is the first piece of the resulting string.

@fourcube fourcube closed this Nov 8, 2014
@fourcube fourcube reopened this Nov 8, 2014
@fourcube
Copy link
Author

fourcube commented Nov 8, 2014

I have restored the old sanitization logic. The new piece of code converts the questionable path to a relative path (when applicable) and passes it on to the original logic. I successfully tested the fix on my Windows box.

@parkr parkr changed the title Fix for https://github.com/jekyll/jekyll/issues/3068 Fix for #3068 (Windows Path Sanitation) Nov 8, 2014
@parkr
Copy link
Member

parkr commented Nov 8, 2014

Cool, thanks! This method is called a lot so I'd love to find a way to make it a bit faster.

LubomirGeorgiev added a commit to LubomirGeorgiev/freetemplatesdownload.info that referenced this pull request Nov 8, 2014
@parkr
Copy link
Member

parkr commented Nov 9, 2014

Superceded by #3077. Thank you for taking the time to submit a PR, though!!!

@parkr parkr closed this Nov 9, 2014
@fourcube
Copy link
Author

fourcube commented Nov 9, 2014

#3077 is a nice solution. I learned something, so thanks!

@fourcube fourcube deleted the fix_windows_path_duplicates_v3 branch November 9, 2014 09:26
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
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.

Jekyll 2.5.0 broken on Windows
3 participants