Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Pick safe default algorithm for Pathname#cleanpath #213

Closed
wants to merge 1 commit into
from

Conversation

2 participants

eam commented Nov 14, 2012

Pathname#cleanpath is a purely lexical cleanup of a unix path, to remove
useless syntax and return an equivalent path. However, the current default
algorithm makes choices that can return semantically different paths.

This patch sets the default algorithm to the safe alternative, guaranteeing the
return of a semantically identical path. The unsafe/aggressive algorithm
remains and can be enabled where appropriate.

@eam eam Pick safe default algorithm for Pathname#cleanpath
Pathname#cleanpath is a purely lexical cleanup of a unix path, to remove
useless syntax and return an equivalent path. However, the current default
algorithm makes choices that can return semantically different paths.

This patch sets the default algorithm to the safe alternative, guaranteeing the
return of a semantically identical path. The unsafe/aggressive algorithm
remains and can be enabled where appropriate.
0c841f9

eam commented Nov 14, 2012

For added context, here's an example of how this can currently fail: https://gist.github.com/4069375

Member

zzak commented Nov 19, 2012

Closing this, please refer to Feature #7401 in redmine

@zzak zzak closed this Nov 19, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment