Re: BUG #19423: canonicalize_path does not function correctly when processing paths that contain . and .. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #19423: canonicalize_path does not function correctly when processing paths that contain . and ..
Date
Msg-id 1003730.1772548104@sss.pgh.pa.us
Whole thread Raw
In response to BUG #19423: canonicalize_path does not function correctly when processing paths that contain . and ..  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> When the input parameter path of the function is
> /tmp/root_hack4_test_tablespace/./../../test, the expected result after
> processing by canonicalize_path is /test, but the actual result remains
> /tmp/root_hack4_test_tablespace/./../../test.

AFAICT it does what you're expecting in v15 and later.  The previous
implementation did not promise to clean up '.' and '..' everywhere;
it only said

  *            o  remove trailing '.'
  *            o  process trailing '..' ourselves

> The implementation of this function differs significantly between version
> 14, version 15, and later versions.

See commit c10f830c511f0ba3e6f4c9d99f444d39e30440c8, particularly
the commit message's explanation of why not back-patch it.

            regards, tom lane



pgsql-bugs by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: [BUG] Assert failure in ReorderBufferReturnTXN during logical decoding due to leaked specinsert change
Next
From: Richard Guo
Date:
Subject: Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34