| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Bruce Momjian <bruce(at)momjian(dot)us> |
| Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: is_absolute_path incorrect on Windows |
| Date: | 2011-02-03 18:32:31 |
| Message-ID: | 26121.1296757951@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Tom Lane wrote:
>> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>>> I have reviewed is_absolute_path() and have implemented
>>> path_is_relative_and_below_cwd() to cleanly handle cases like 'E:abc' on
>>> Win32; patch attached.
>>
>> This patch appears to remove some security-critical restrictions.
>> Why did you delete the path_contains_parent_reference calls?
> They are now in path_is_relative_and_below_cwd(),
... and thus not invoked in the absolute-path case. This is a security
hole.
> I don't see a general reason to prevent
> ".." in absolute paths, only relative ones.
load '/path/to/database/../../../path/to/anywhere'
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2011-02-03 18:47:37 | Re: ALTER EXTENSION UPGRADE, v3 |
| Previous Message | Dimitri Fontaine | 2011-02-03 18:27:01 | Re: ALTER EXTENSION UPGRADE, v3 |