Hsnmohd commented on PR #3329: URL: https://github.com/apache/httpcomponents-client/pull/3329#issuecomment-7315318370
The requested mode is still filtered through the umask of the identity the JRE runs as: open(2) masks the creation mode, so rw------- can only ever lose bits, never gain them. What the patch removes is the library depending on umask to drop the group and other read bits. FileOutputStream asks for 0666, so with the common default of 022 the cached body of an authenticated response lands rw-r--r--, and the cache directory mode does not help because a new POSIX file does not inherit it. What it does take away is deliberately running umask 007 to share the cache directory with a service group. If that is worth keeping, I can add a constructor that takes the permissions and defaults to owner-only. The NOFOLLOW_LINKS half is separate from the mode: the file name is fully determined by the request URI and the ETag, so anyone able to write into the cache directory can plant a link at that name and have the next cache write land on its target. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
