Re: pgsql: Properly handle Win32 paths of 'E:abc', which can be either abso - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Properly handle Win32 paths of 'E:abc', which can be either abso
Date
Msg-id 5079.1297530202@sss.pgh.pa.us
Whole thread Raw
In response to pgsql: Properly handle Win32 paths of 'E:abc', which can be either abso  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pgsql: Properly handle Win32 paths of 'E:abc', which can be either abso  (Bruce Momjian <bruce@momjian.us>)
List pgsql-committers
Bruce Momjian <bruce@momjian.us> writes:
> Properly handle Win32 paths of 'E:abc', which can be either absolute or
> relative, by creating a function path_is_relative_and_below_cwd() to
> check for specific requirements.  It is unclear if this fixes a security
> problem or not but the new code is more robust.

Surely this test is backwards?

+bool
+path_is_relative_and_below_cwd(const char *path)
+{
+   if (!is_absolute_path(path))
+       return false;


            regards, tom lane

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: DDL support for collations
Next
From: Tom Lane
Date:
Subject: pgsql: Refactor ALTER EXTENSION UPDATE to have cleaner multi-step seman