Skip to content
Browse files

Damn .. this bug was stopping the admin user being created properly.

(Checking for uploaded file)
  • Loading branch information...
1 parent c8da3bf commit df8fa8f1eeb354da5c9b9747b534868ce03e9d5f martin committed Aug 8, 2002
Showing with 4 additions and 4 deletions.
  1. +4 −4 admin/user.php
View
8 admin/user.php
@@ -89,15 +89,15 @@
$timenow = time();
- if ($imagefile && $imagefile!="none") {
- $imageinfo = GetImageSize($imagefile);
+ if ($filename = valid_uploaded_file($imagefile)) {
+ $imageinfo = GetImageSize($filename);
$image->width = $imageinfo[0];
$image->height = $imageinfo[1];
$image->type = $imageinfo[2];
switch ($image->type) {
- case 2: $im = ImageCreateFromJPEG($imagefile); break;
- case 3: $im = ImageCreateFromPNG($imagefile); break;
+ case 2: $im = ImageCreateFromJPEG($filename); break;
+ case 3: $im = ImageCreateFromPNG($filename); break;
default: error("Image must be in JPG or PNG format");
}
if (function_exists("ImageCreateTrueColor")) {

0 comments on commit df8fa8f

Please sign in to comment.
Something went wrong with that request. Please try again.