Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
New maintenance task
« on January 12th, 2013, 05:56 AM »
Been thinking about this a bit, not entirely sure what it needs, but thought I'd suggest it.

It's been the case for a long time that plugins can't touch the core, and it's now the case that files don't end in ?> which means one of my original thoughts on this subject is no longer necessary.

But anyway. I was going to do a maintenance task, running say every other week, to scan the files. It would scan the files for things like rogue characters at the start or end of files (though with the lack of trailing ?> this is a bit more difficult), perhaps for common injection type things and report to the admin area.

I kind of see this as a new area above the 'New to Wedge' box that's there, maybe even replacing it, don't know yet, where the admin panel flags up some tasks that are needed. For example, it strikes me that it would be neat to include a monthly reminder to update your anti spam Q&A as a 'Things to do' page.

This isn't original; IPB does it, and it strikes me that having such a notification (similar to, but more prominent, the admin panel upgrade notification in SMF) would be beneficial in encouraging people to fix things.

I could go on to have it be popping up even on a fresh install as 'You haven't set questions yet...' like a sort of warning. I'm getting a bit ahead of myself *rerail!*

So, maintenance task doing a health check. It could also conceivably do checking of file dates now that the core files don't need to be touched, except for Subs-Aeva-Sites.php which gets rewritten on updating the active site list. (Need to fix that. It causes havoc on systems that lock permissions down, not to mention the fact that having a core file be writable is asking for trouble.)


Comments?
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Aaron

  • Posts: 356
Re: New maintenance task
« Reply #1, on January 12th, 2013, 04:48 PM »
Just a quick note, if you're opting for plugins not touching the core files in all cases, you could even take it one step further and check a hash sum of each source file against the official ones...
"The entire British Empire was built on cups of tea … and if you think I'm going to war without one, mate, you're mistaken."

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New maintenance task
« Reply #2, on January 12th, 2013, 05:16 PM »
That occurred to me too, though I can imagine problems if folk edit their files directly, especially theme ones.

Anthony`

  • Posts: 53
Re: New maintenance task
« Reply #3, on January 13th, 2013, 12:20 AM »
Quote from Arantor on January 12th, 2013, 05:16 PM
That occurred to me too, though I can imagine problems if folk edit their files directly, especially theme ones.
In that case maybe it wouldn't be a good idea to check file dates cause another issue would be when people are transferring files to a new host?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New maintenance task
« Reply #4, on January 13th, 2013, 12:23 AM »
That's why I'm wary of implementing a check against file contents. File dates, not so much.