[wp-trac] [WordPress Trac] #41597: Language pack download requires too broad file system permissions

WordPress Trac noreply at wordpress.org
Wed Aug 9 17:27:56 UTC 2017


#41597: Language pack download requires too broad file system permissions
-----------------------------+-----------------------------
 Reporter:  kpumuk           |      Owner:
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Upgrade/Install  |    Version:  trunk
 Severity:  normal           |   Keywords:
  Focuses:  administration   |
-----------------------------+-----------------------------
 Language packs are installed into `wp-content/languages` directory. The
 problem is, even if the directory exists, and WordPress is allowed to
 create files there, it is still required to:

 * for WordPress to have permissions in the `wp-content` directory. This is
 because `$upgrader->fs_connect()` is called with an array of two
 directories – `WP_CONTENT_DIR` and `WP_LANG_DIR`, and `fs_connect()` only
 checks the permissions to the first one.
 * for WordPress to have the exact file owner for the `wp-content`
 directory. Cause - `wp_can_install_language_pack()` calls `fs_connect()`
 wihout `$allow_relaxed_file_ownership`

 I think languages, downloaded from a known source, should not require such
 a draconian measures. Instead, WordPress should successfully download and
 install languages if it can write to `wp-content/languages` directory (and
 not require ownership permissions for either `wp-content` or `wp-
 content/languages`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41597>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list