Canonical path for /ssss/../../ ? (original) (raw)
Weijun Wang weijun.wang at oracle.com
Fri Nov 23 04:20:03 UTC 2012
- Previous message: Request for Review: 5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
- Next message: javax.sql.rowset.serial.SerialBlob doesn't support free and getBinaryStream
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I've seen something weird on Linux:
new File("/ssss/../").getCanonicalFile()' = / new File("/ssss/../../").getCanonicalFile()' = /.. new File("/ssss/../../../").getCanonicalFile()' = / new File("/ssss/../../../../").getCanonicalFile()' = /..
and
new File("/ssss/../..").getCanonicalFile().getCanonicalFile() = /
Is "/.." canonical? Shouldn't getCanonicalFile() be idempotent?
Thanks Max
- Previous message: Request for Review: 5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
- Next message: javax.sql.rowset.serial.SerialBlob doesn't support free and getBinaryStream
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]