WordPress.org

Ready to get started?Download WordPress

Forums

Replace tmpfile() function with tempnam() (1 post)

  1. madmuffin
    Member
    Posted 5 years ago #

    I noticed that WordPress is using the tmpfile() function which does not regard the upload_tmp_dir value. It would be better to use tempnam() instead.

    these 3 files make use of the tmpfile function:

    info.php
    wp-admin/includes/class-wp-filesystem-ftpext.php
    wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php

    I am a shared host and normally customers have their own tmp folder but tmpfile always writes to /tmp/ on *nix systems, so I have to give them more permissions than usual.

Topic Closed

This topic has been closed to new replies.

About this Topic