1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Functionality to identify and action orphan files within XF installation

Discussion in 'XenForo Suggestions' started by Mouth, Jan 28, 2016.

  1. Mouth

    Mouth Well-Known Member

    When add-ons are un-installed (and threads/resources hard deleted that contain attachments?) they leave their files behind in your XF file structure. After a while, this leaves unnecessary size growth and, more importantly, potential for exploit vectors.

    Similar to ACP | Tools | File Health Check, please add functionality for 'Orphan File Check' that will review all files within an XF installation ( particularly library/ and data/ ) and identify those that are orphaned from all add-ons and uploads, and give you the option to move them into a dated .zip archive file.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Attachments are deleted from the file server via a routine cron task in these situations.
    Mouth likes this.
  3. rainmotorsports

    rainmotorsports Well-Known Member

    Techinically @Chris D already has a little bit of ground work laid down for this in his old add-on builder. For each given addon it can identify the files in use. Analyze that against the crap left behind that takes care of PHP files. A little harder to step through the templates and accurately identify included resources. I think its very possible that very complex addons are at the risk of losing files that would seem orphaned because of their complex nonstandard use.

    Xenforo itself has left over scraps over the years. Especially if you were on 1.1/1.1. But some other minor stuff. I actually made a list once of the file difference between every single release. A couple of times 2 files relating to the resource manager got accidentally included. No consequence to it of course.
    Mouth likes this.

Share This Page