I will PM you with the edits, I will not post it here because its not for the extension to use.TheFactor82 wrote: 06 Dec 2017, 10:41 Ehy, it was not my intention to be rude, I'm just trying to understand.![]()
3.2 & 3.3 Extensions Database 3.2 / 3.3 ⇒ File Upload
-
- Founder
- Posts: 6464
- Joined: 13 Jan 2014, 21:45
Re: File Upload
-
- Users
- Posts: 112
- Joined: 25 Aug 2016, 12:50
Re: File Upload
Consider this, what if two (or more) users try and upload an image, with the same filename? Which does the system keep or rename?
Having said that, if they were not generated filenames, uploaded images would continue overwriting themselves, such as the infamous 'screenshot.png' filename.
Don't mean to jump in or be rude.. just defending good coding!
Having said that, if they were not generated filenames, uploaded images would continue overwriting themselves, such as the infamous 'screenshot.png' filename.
Don't mean to jump in or be rude.. just defending good coding!
World of Phaos RPG online is making it's come back! Play free now!
Check out phpBB contributions & extension downloads.
-
- Admin
- Posts: 5105
- Joined: 06 Apr 2014, 16:12
Re: File Upload
Lets say i got an image and its got a nasty gift inside and its called screenshot-02 and i upload that all i have to do is run yoursitename/ext/dmzx/imageupload/files/screenshot-02.png and bingo your site is mine
now if it was auto renamed (given an encrypted name) once it hits the server i know the path but not the name so in one way keeping real names is a bad idea (i can see why you want it just dont understand the logic).


-
- Users
- Posts: 15
- Joined: 17 Nov 2017, 14:42
Re: File Upload
I understand the explanations regarding good coding, and issues related to files overwrites...
But I don't understand security issues for what Martin says:
ok, let's say Martin has an image/file with a nasty gift for my domain. He uploads it with the extension (modified by Dmzx). This is the result:

So, if Martin wants, all what he has to do is run phpbb3/ext/dmzx/fileupload/files/nasty.zip (as shown in the screenshot... The extension gives you the url) and bingo, my site is yours!
But if I leave all the things as they currently are, when Martin uploads his nasty file with the ORIGINAL extension, this is the result:

So, if Martin wants, all what he has to do is run phpbb3/ext/dmzx/fileupload/files/75420c916e7302603baee.zip (as shown in the screenshot... The extension gives you the url) and bingo, my site is yours!
So... Where is the difference? Where is the enhanced security?
Ps for DMZX: your PM works perfectly. It seems not working the ACP control panel (not deleting files in directory) but that's really NOT a problem for me! Thanks a lot for your help!
But I don't understand security issues for what Martin says:
ok, let's say Martin has an image/file with a nasty gift for my domain. He uploads it with the extension (modified by Dmzx). This is the result:

So, if Martin wants, all what he has to do is run phpbb3/ext/dmzx/fileupload/files/nasty.zip (as shown in the screenshot... The extension gives you the url) and bingo, my site is yours!
But if I leave all the things as they currently are, when Martin uploads his nasty file with the ORIGINAL extension, this is the result:

So, if Martin wants, all what he has to do is run phpbb3/ext/dmzx/fileupload/files/75420c916e7302603baee.zip (as shown in the screenshot... The extension gives you the url) and bingo, my site is yours!
So... Where is the difference? Where is the enhanced security?
Ps for DMZX: your PM works perfectly. It seems not working the ACP control panel (not deleting files in directory) but that's really NOT a problem for me! Thanks a lot for your help!
-
- Users
- Posts: 112
- Joined: 25 Aug 2016, 12:50
Re: File Upload
Now I'm interested more. Good points by all of you. Renaming uploaded files is just a precautious step for uploading security. Renaming is NOT encrypting or securing. There is much more than that that's needed for it to actually be secure. Such as checking MIME types, which doesn't provide a secure upload all on it's own either. Having said that, there should be several checks in place for allowing uploads.
phpBB software actually hides the actual URL for security, not just change the file name. I do not see this extension do that yet, how hard would that be? I think I could help on this. I mean if yall want help, the code already exists elsewhere! No one should blink at imageupload security if that were to added mates. :)
Found in download/file.php around line#300
Line 315
For example, my avatar url here is: download/file.php?avatar=2200_1482487561.png
.. And most of us here know, that's NOT where it's actually stored! Or what it was named. This makes life harder for attackers, and is the very point of security.
phpBB software actually hides the actual URL for security, not just change the file name. I do not see this extension do that yet, how hard would that be? I think I could help on this. I mean if yall want help, the code already exists elsewhere! No one should blink at imageupload security if that were to added mates. :)
Found in download/file.php around line#300
Code: Select all
wrap_img_in_html(append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'id=' . $attachment['attach_id']), $attachment['real_filename']);
Code: Select all
redirect($phpbb_root_path . $config['upload_path'] . '/' . $attachment['physical_filename']);
.. And most of us here know, that's NOT where it's actually stored! Or what it was named. This makes life harder for attackers, and is the very point of security.
-
- Donator
- Posts: 30
- Joined: 19 Oct 2017, 05:10
Re: File Upload
So are we saying that these extensions are a huge security hole? Should I not be using these?
-
- Users
- Posts: 118
- Joined: 06 Feb 2016, 19:22
Re: File Upload
This is safe as long as you don't allow any extension like php or etc. It can use for php injection.
Sir dm can you give me too the edits that filename cannot encrypted or renaming. thanks
Sir dm can you give me too the edits that filename cannot encrypted or renaming. thanks
Compilation of Android Roms, Recoverys, Apps, Games and Tricks
Visit my blog http://androidcribs.com

Visit my blog http://androidcribs.com
- Androidcribs.com
- Androidcribs

-
- Users
- Posts: 112
- Joined: 25 Aug 2016, 12:50
Re: File Upload
No one said that. You are summing up all extensions here in what you said. We are discussing File Upload. As a webmaster, you must understand that nothing is 100% secure (do you watch the media at all?), and anytime you except files to be uploaded on your server (just like clicking email attachments), you alone are opening the door for attackers. We are merely discussing how to add more to secure uploading within this extension.nou nou wrote: 03 Jan 2018, 02:15 So are we saying that these extensions are a huge security hole? Should I not be using these?
@ DM, isn't using the phpbb wrap_img_in_html() function a resolution (or an edited version of it)?
-
- Users
- Posts: 193
- Joined: 20 Jun 2015, 17:58
Re: File Upload
Hey DM, got any plans for next release on this ext?dmzx wrote: 27 Feb 2017, 22:26 The $allowed_extensions is not in the file upload code yet.
Will be in next release.
![]()
-
- Users
- Posts: 9
- Joined: 13 Dec 2015, 16:09
Re: File Upload
Hi everyone!!
Great ext, dmzx!!
I would like to suggest including any way to avoid multiple loads of a specific user or group ...
I had a stupid, who was loading my personal files to my host, ... until I was persuaded of it
Maybe you could limit the maximum number of uploads per day, or by a certain capacity per user.
And the second issue is that I would like to use this ext too in the quick reply.
Is there any way to do that?
Thanks in advance!!
Great ext, dmzx!!
I would like to suggest including any way to avoid multiple loads of a specific user or group ...
I had a stupid, who was loading my personal files to my host, ... until I was persuaded of it
Maybe you could limit the maximum number of uploads per day, or by a certain capacity per user.
And the second issue is that I would like to use this ext too in the quick reply.
Is there any way to do that?
Thanks in advance!!
-
- Users
- Posts: 918
- Joined: 02 Feb 2018, 12:04
Re: File Upload
Which is the file i can change the MB ?
Feed like a disease
And bring them to their knees
They'll pay for their deceit
And bring them to their knees
They'll pay for their deceit
-
- Admin
- Posts: 5105
- Joined: 06 Apr 2014, 16:12
Re: File Upload
What does it say in this image 
after giving your self a face slap what does it say in my image

after giving your self a face slap what does it say in my image
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.