1
Anonymous
Upload refused with Extgallery
  • 2012/8/14 20:07

  • Anonymous

  • Posts: 0

  • Since:


When trying to upload a picture I get the error "Suspicious image upload refused". I tried it with protector disabled but I still get the same error. What could be the problem? Uploading pictures used to work before!

Xoops version is 2.5.4, Extgallery version 1.1

2
redheadedrod
Re: Upload refused with Extgallery

Did your host maybe upgrade your PHP and mess up your php.ini file?

Sounds like they did something if you didn't.

3
Anonymous
Re: Upload refused with Extgallery
  • 2012/8/15 10:52

  • Anonymous

  • Posts: 0

  • Since:


These are the server stats (shared hosting...).

Quote:
XOOPS versie XOOPS 2.5.4
PHP versie 5.2.17
mySQL versie 5.1.39-community
Server API apache2handler
Besturingssysteem Linux
safe_mode Off
register_globals Off
magic_quotes_gpc Off
allow_url_fopen Off
fsockopen On
post_max_size 64M
max_input_time 60
output_buffering 4096
max_execution_time 30
memory_limit 64M
file_uploads On
upload_max_filesize 64M

4
irmtfan
Re: Upload refused with Extgallery
  • 2012/8/15 11:06

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


what is your image?
It seems Xoops uploader block it.
it seems it is because of old IE browser?

see in class/uploader.php around line 366:
// Check IE XSS before returning success
        
$ext strtolower(substr(strrchr($this->savedDestination'.'), 1));
        if (
in_array($ext$this->imageExtensions)) {
            
$info = @getimagesize($this->savedDestination);
            if (
$info === false || $this->imageExtensions[(int) $info[2]] != $ext) {
                
$this->setErrors(_ER_UP_SUSPICIOUSREFUSED);
                @
unlink($this->savedDestination);
                return 
false;
            }
        }


5
Anonymous
Re: Upload refused with Extgallery
  • 2012/8/15 11:32

  • Anonymous

  • Posts: 0

  • Since:


Quote:
what is your image?
It seems Xoops uploader block it.
it seems it is because of old IE browser?


Don't insult a proud Mac user by suggesting he works with old IE I did some further testing and found the extension .jpeg is the problem, when renaming to .jpg the upload runs fine. I tried uploading .jpeg with chrome and firefox, so the problem seems to be browser independent.

6
irmtfan
Re: Upload refused with Extgallery
  • 2012/8/16 5:22

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


maybe the picture was originally a jpg not a jpeg.
Xoops will recognize such a file as a malicious attack.
Also as you may know it easily be possible to embed a malicious file inside a nice picture. these files all will be blocked by xoops uploader.

Also you can check your include/mimetypes.inc.php to find if the following mime is exist or not:
'jpeg' => 'image/jpeg' ,

Honestly the above file is really outdated these days.
we need to have an advance mimetype manager in xoops 2.6 that could accept adding mime in the database and have permissions for groups like webmasters and registered users.

currently many modules like extgallery have their own mimetype tables in database which is really in conflict with the core.
Core 2.6 should end these mess and unit all of that.
I sent a feature request to the tracker and i hope core team include it in the next release.

Login

Who's Online

269 user(s) are online (183 user(s) are browsing Support Forums)


Members: 0


Guests: 269


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits