Announcement

  •  » Requests
  •  » Integrity check on the piwigo's files

#1 2008-11-16 20:30:10

grum
Former Piwigo Team
Pantin
2007-09-10
1371

Integrity check on the piwigo's files

On this topic French (http://forum.phpwebgallery.net/viewtopi … 797#p99797) I propose to establish a system to check the integrity of the piwigo files. We can see frequently on the forum, there is bugs corrected after some files have been uploaded again.

The idea is that during the installation or upgrade, each file is checked by a CRC32 or MD5 sum.
This can be made with a simple text file, with a filename and his MD5 sum by line.
If a file seems to be corrupted, abort the install/upgrade process and ask for a new upload.

About this functionality, is it needed for the next piwigo release, or waiting for the colibri release ? Adding new features will delay the release date...


My pictures with Piwigo, of course !
[ www.grum.fr ]

Offline

 

#2 2008-11-16 22:25:04

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Integrity check on the piwigo's files

grum wrote:

I propose to establish a system to check the integrity of the piwigo files. We can see frequently on the forum, there is bugs corrected after some files have been uploaded again.

The idea is that during the installation or upgrade, each file is checked by a CRC32 or MD5 sum.
This can be made with a simple text file, with a filename and his MD5 sum by line.
If a file seems to be corrupted, abort the install/upgrade process and ask for a new upload.

It's a very good idea I think, and it also seems quite easy to implement:

1. in tools/pwg_rel_create.sh (the script I use to generate releases), I add something like:

Code:

$ find . -type f | xargs md5sum > install/MD5SUMS

2. in install.php and upgrade.php, we use a function that checks the expected md5sum against the current md5sum (in PHP, I use md5_file, see include/ws_functions.inc.php::ws_images_add function)

grum wrote:

About this functionality, is it needed for the next piwigo release, or waiting for the colibri release ? Adding new features will delay the release date...

I don't think this kind of small (but smart) improvement on the installation/upgrade process will postpone the release date. 2.0.0 release availability is mainly delayed because the website is not ready, and it won't be ready in 1 week.

Offline

 
  •  » Requests
  •  » Integrity check on the piwigo's files

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact