[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [lintian] 01/01: coll/unpacked: Gracefully handle symlink targets with newlines



* Niels Thykier <niels@thykier.net>, 2014-10-17, 12:32:
+            '|',
+            ['perl', '-l', '-0', '-pe', 's/\n/\\\n/g'],

Hmm. Shouldn't we escape other special characters, too?

Possibly, but I suspect the effect is less problematic there because the raw ones should be passed through just fine. The sole exception is probably "\\" which should be escaped as we unconditionally dequote the result.

Yes, backslash is certainly problematic: if we didn't escape it, then filenames with newlines and ones with literal "\n" would be indistinguishable.

Do you have any other characters that might be problematic?

I didn't have anything particular in mind except backslash. But then I'm too lazy^Wbusy to look at the code that uses this data. :-)

--
Jakub Wilk


Reply to: