if (opendir ($dir, ACCESS_PATH)) {
while (defined($path = readdir $dir)) {
+ if ($path !~ /^[0-9a-fA-F]+$/) {
+ next;
+ }
if (open ($file, '<', ACCESS_PATH.$path)) {
- $unlocktime=<$accessfile>;
- $lasttime=<$accessfile>;
+ $unlocktime=<$file>;
+ $lasttime=<$file>;
close($file);
- if (($unlocktime !~ /^([0-9]+)$/) || ($lasttime !~ /^([0-9]+)$/)) {
+ if (($unlocktime !~ /^([0-9]+)$/) or ($lasttime !~ /^([0-9]+)$/)) {
unlink (ACCESS_PATH.$path);
}
elsif ((abs($time-$unlocktime)>$timeout_unlock) or (abs($time-$lasttime)>$timeout_inact)){