update.php patch
Posted: 27 Dec 2007, 09:58
I noticed some users got into trouble by uncommenting their sources.php and subsequently do an update via the web interface. This can easily be avoided by having the update software check the uncommenting. Here's a quick patch for update.php that does this. Maybe an idea to implement this into future versions?
Ubi
Code: Select all
9,15d8
< #check if user messed up the sources file
< $cmd="grep -v \"#\" /etc/apt/sources.list | grep deb | wc -l";
< exec($cmd, $out, $ret);
< if ($out[0] != 1) {
< print "you messed with the sources.list. No updates for you!<br>";
< flush();
< } else {
36,37d28
< };
<