Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad file detected #4799

Closed
sensei116 opened this issue Jun 23, 2022 · 1 comment
Closed

Bad file detected #4799

sensei116 opened this issue Jun 23, 2022 · 1 comment
Labels
type: bug A problem that should not be happening
Milestone

Comments

@sensei116
Copy link

sensei116 commented Jun 23, 2022

Bug Description

Hi.

I have an issue using the latest version of e107.
When I try to upload any PPTX (for example) file to my site, I get an error message on my screen telling me that "Bad file is detected".
What was done previously:

  1. E107 was installed the first.
  2. I added two new formats to filetypes.xml. The extensions are now displayed in my admin area and the file size quota is correct.
  3. I added the new extensions to uploader JS file where the file filter categories are established.

Now I am able to select the necessary file, then I see it in the list for uploads waiting for being started, but then, when I press "upload" button, I get the error message.

How to Reproduce

Steps to reproduce the behavior:

  1. Go to filetypes.xml
  2. Add necessary extension records.
  3. Try to upload the file

Expected Behavior

Files are uploadable after extension is in filetypes.xml.

Screenshots

image

Server Information

PHP Operating System

Linux DCS-KAZLAB-ROOT 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5+deb10u2 (2019-08-08) x86_64
PHP Version

PHP Version 7.3.31-1~deb10u1
PHP Modules

apache2handler
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib
Client Information

Your user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0
Other HTTP headers
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.5
Host: duckduckgo.com
TE: trailers
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0
SEC-FETCH-DEST: document
SEC-FETCH-MODE: navigate
SEC-FETCH-SITE: none
SEC-FETCH-USER: ?1
SSL-JA3-HASH: be12eb3bab3313e8d159fd00f469cae2
UPGRADE-INSECURE-REQUESTS: 1

@sensei116 sensei116 added the type: bug A problem that should not be happening label Jun 23, 2022
@sensei116
Copy link
Author

It looks that I have found a workaround:

  1. Open filetypes.xml, add your new extension.
    image

  2. Open MediaManager.js, add these extensions too.
    image

  3. Open upload_handler.php, add them again.
    image

  4. Open file_class.php, do it again.
    image

Then everything works (if you do not use 2.3.0).

But, can it be, that all these units get extensions list just from filetypes.xml?
It looks the proper way then.

@CaMer0n CaMer0n added this to the e107 2.3.3 milestone Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A problem that should not be happening
Projects
None yet
Development

No branches or pull requests

2 participants