diff options
author | Kevin McCarthy <kevin@8t8.us> | 2020-11-06 14:02:49 -0800 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2020-11-06 14:10:34 -0800 |
commit | f5aa9382edd1f044c5d86da0ee0cd2f3cbb1b2b3 (patch) | |
tree | 2b516e18a05c7bc6763e67f08ba91c62754b6519 | |
parent | 6704caf444fa9746bc641da2ee3f5477d372e50f (diff) |
Disable normalization after expand_path().
The algorithm used was incorrect, for '..' expansion with symlinks
involved. Furthermore, mutt_pretty_mailbox() takes care of this for
us.
To be conservative, just before the release, I'm leaving the function
but converting it to a noop. I'll pull the function out after the
release.
Thanks to Oswald Buddenhagen for pointing out the bug!
-rw-r--r-- | muttlib.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -411,6 +411,16 @@ static void buffer_normalize_fullpath (BUFFER *dest, const char *src) if (!src) return; + /* Disabling this for the 2.0 release. + * See Gitlab #290 - '..' can not be simplified in this manner. + * Furthermore, it looks like mutt_pretty_mailbox() calls realpath() + * if there are any '..' strings in the path, and does its own '.' + * normalization much more succinctly than this. I'll remove this + * code after the release. + */ + mutt_buffer_strcpy (dest, src); + return; + if (*src != '/') { mutt_buffer_strcpy (dest, src); |