[pLog-svn] File integrity check?

Oscar Renalias oscar at renalias.net
Mon May 21 09:13:51 EDT 2007


Hi,

I've recently noticed in the forums many weird issues related to
people uploading files incorrectly and/or FTP clients messing up file
uploads, which then caused LT to behave in "funny" ways.

I'm wondering if anybody has any idea about how we could detect these
situations. One thing I am considering is including a file with the
MD5 hash of some core files (like all the files in templates/admin/,
templates/wizard/ and the class/ folder) and then write some code that
would compare the MD5 hashes of the current version of these files
against the master list. If a file does not match, a warning message
should be displayed to alert the user that this could potentially
cause problems. This will be run as the first thing in wizard.php and
accessible via the admin interface as well.

Of course this master list of MD5 hashes should be updated with every
release but I think it can easily be done with the build scripts that
we've got in place, so that it would be part of the final package.

That's just one idea :-) I'm not sure if it would work, or even if it
would take too long to generate hashes for a few hundred files...

Any more ideas?

Oscar


More information about the pLog-svn mailing list