Re: drop tablespace failed when location contains .. on win32 - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: drop tablespace failed when location contains .. on win32
Date
Msg-id YfeapcO2WECIhMQo@paquier.xyz
Whole thread Raw
In response to Re: drop tablespace failed when location contains .. on win32  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: drop tablespace failed when location contains .. on win32
List pgsql-hackers
On Sun, Jan 30, 2022 at 04:50:03PM -0500, Tom Lane wrote:
> Here's a revised patch version that does it like that.  I also
> reviewed and simplified the canonicalize_path logic.  I think
> this is committable.

Thanks for the updated version.  The range of the tests looks fine
enough, and the CF bot does not complain.  The code is
straight-forward and pretty clear in terms of the handling of ".",
".." and the N-depth handling necessary.

Should we have tests for WIN32 (aka for driver letters and "//")?
This could be split into its own separate test file to limit the
damage with the alternate outputs, and the original complain was from
there.

> (I suspect that adminpack's checks for unsafe file names could
> now be simplified substantially, because many of the corner cases
> it worries about are no longer possible, as evidenced by the change
> in error message there.  I've not pursued that, however.)

Fine by me to let this part for later.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Catalog version access
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: [PATCH] Accept IP addresses in server certificate SANs