pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #19423: canonicalize_path does not function correctly when processing paths that contain . and ..
2+ messages / 2 participants
[nested] [flat]

* BUG #19423: canonicalize_path does not function correctly when processing paths that contain . and ..
@ 2026-03-03 07:27 PG Bug reporting form <noreply@postgresql.org>
  2026-03-03 14:28 ` Re: BUG #19423: canonicalize_path does not function correctly when processing paths that contain . and .. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2026-03-03 07:27 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: 1003931418@qq.com

The following bug has been logged on the website:

Bug reference:      19423
Logged by:          SHIQI LI
Email address:      1003931418@qq.com
PostgreSQL version: 14.22
Operating system:   linux
Description:        

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.
The implementation of this function differs significantly between version
14, version 15, and later versions.







^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #19423: canonicalize_path does not function correctly when processing paths that contain . and ..
  2026-03-03 07:27 BUG #19423: canonicalize_path does not function correctly when processing paths that contain . and .. PG Bug reporting form <noreply@postgresql.org>
@ 2026-03-03 14:28 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2026-03-03 14:28 UTC (permalink / raw)
  To: 1003931418@qq.com; +Cc: pgsql-bugs@lists.postgresql.org

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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-03-03 14:28 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-03 07:27 BUG #19423: canonicalize_path does not function correctly when processing paths that contain . and .. PG Bug reporting form <noreply@postgresql.org>
2026-03-03 14:28 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox