mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-04 15:54:00 +01:00
The 2 x if conditions added a security measure to avoid path traversals, should languageBase or languageUser ever be set to something malicious such as (eg ../../../../../../../etc/passwd) However, it meant that the ICEcoder dir and the doc root dir paths had to both start the same, and so be in the same location really. It was previously a benefit to have them possibly contain different paths, but this security point restricts this. We can remove these 2 if conditions however and simply wrap the 2 array values with basename(), so we take only the trailing file name and so avoid path traversal issues.
11 KiB
11 KiB