vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=34338

Attachments Not in Database
by Scott MacVicar
21 Jan 2002 22:00

This is a hack which allows you to save the attachments as files and not within the database. The main problem with this was the fact that it posed certain security issues, these have been tackled by doing the following
  • Placing the folder below document root
  • Using random hashes to name the file
  • Changing the file extension to .file
  • Never divulging the path to the file

This is a beta hack, it has been tested on a development board. I have had insufficent time to fully complete the attachment importer, this removes the files from the database and creates them as physical files in the attachment folder. I will post this as soon as possible.

Looking forward to your feedback.

Scott

To install this hack upload this file to the admin directory and then view it in your browser.

All the changes that Jawelin suggested have been applied, thanks man :)

Dade 21 Jan 2002 23:27

Man oh man, thanks! :eek: :D

MrLister 22 Jan 2002 02:11

this is great. Although I can't experiment much with it I hope people that install it say how it goes.

SaintDog 22 Jan 2002 04:09

I will install it on my test board tonight and let you know how it goes PPN.

SaintDog 22 Jan 2002 04:31

1 Attachment(s)
Well, I have just installed it and was about to test it yet I noticed the below, is there suppsed to be 5 boxes to place the root directory path in?

Scott MacVicar 22 Jan 2002 07:14

how many times did you run the query to insert into settings???

Martz 22 Jan 2002 08:17

PPN you ARE the man :)

Not going to install this just yet, but a massive thanks for making it! - it is needed by the masses!

Scott MacVicar 22 Jan 2002 08:51

i've completed the other bits i forgot about, the edit and delete options that are placed around the vBulletin files.

I'm in school at the moment so i'll load the file when i get home and mention it in the first post, will also work on an installer file.

SaintDog 22 Jan 2002 09:14

Quote:

Originally posted by PPN
how many times did you run the query to insert into settings???
Only once for each query - this is being run from my windows server though so there could be some problems.

I will try again though with a clean install.

epic 22 Jan 2002 09:41

something wrong when use this hack

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

My 1742 line is
move_uploaded_file($attachment, "$path");

Lesane 22 Jan 2002 12:36

Great PPN, gonna test this hack later.

Scott MacVicar 22 Jan 2002 14:50

@SaintDog
I wrote this hack on a windows2000 server and it worked fine on it, also tested it on a linux system and a raq, havent had any problems. Tested them both with and without safe mode enabled in php, again no problems.

@epic
you haven't set the path to move the files to in the options part of the control panel. There is a large paragraph at the bottom of the hack file, read this and do what it says.

Martz 22 Jan 2002 15:21

Quick question:

Will this maintain the permission for each attachment in a private forum? I.E. if an attachment is posted in the moderators forum - will registered users still be able to see it?

Thanks.

Scott MacVicar 22 Jan 2002 15:27

yes it will, the only difference between this and normal attachments is where it is stored.

As they are required to download the file via attachment.php the appropriate security checks will still be done before they are given the content.

epic 22 Jan 2002 16:03

Quote:

Originally posted by PPN
@SaintDog
I wrote this hack on a windows2000 server and it worked fine on it, also tested it on a linux system and a raq, havent had any problems. Tested them both with and without safe mode enabled in php, again no problems.

@epic
you haven't set the path to move the files to in the options part of the control panel. There is a large paragraph at the bottom of the hack file, read this and do what it says.

I use this hack accord your attachment file.


All times are GMT. The time now is 07:14.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.