Re: Bug in canonicalize_path()
От | Bruce Momjian |
---|---|
Тема | Re: Bug in canonicalize_path() |
Дата | |
Msg-id | 200508120307.j7C376c13707@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Bug in canonicalize_path() (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Bug in canonicalize_path()
|
Список | pgsql-patches |
Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > And then you have this case: > > > /usr/local/../bin/../.. > > AFAICS, the patch I just proposed handles this. > > If I recall the code properly, we do not have to make canonicalize_path > remove embedded "." or ".." --- that is, we do not have to simplify > > /usr/local/../bin > > But we do have to get rid of every trailing "." or "..", else there are > failure cases when we replace the trailing component with an ordinary > file name. But what about "usr/local/../../.."? You loop is similar to what I coded, but then when I realized I had to check for pending trims after I run out of directories, and start appending them to create things like ../.., I gave up. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
В списке pgsql-patches по дате отправления: