Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Closed Thread
 
Thread Tools
Details »»

Version: 1.00, by Scott MacVicar Scott MacVicar is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-20-2002 Last Update: Never Installs: 12
Is in Beta Stage  
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 01-30-2002, 03:48 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by PPN
Jawelin: I have to work out a simple way to do that as its a list of attachment id's, i'm sure i'd have to explode the variable and then do a foreach loop. Will look into this in a bit and then i'll look into the mistake with the hash
PPN, sorry for this reminder, but I'm in trouble with half this hack installed (just the modifications to the DB) and absolutely need to make the tabledump lighter before upgrading to v2.2.2 ...
So, I'm here again to ask to discuss about the unsolved problems.

Sorry again. Hope you could understand.
Thanks.
  #43  
Old 01-30-2002, 04:22 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been busy with school work and i'll look into it in about 2 hours I have some stuff I need to finish before I can check it over. I've also just changed to a new system so moving the files has taken a while too.

Will post a finish to this hack tonight and then get it moved into the full releases section.
  #44  
Old 01-30-2002, 09:25 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorted the problem with an extra .file being appended, this was caused by a problem when the file was created, I recommend apply the getupload function again and the other modification to functions.php which was added to remove the attachments when a thread was deleted.
  #45  
Old 01-31-2002, 12:57 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot.
Such a fast and positive ack should make me mind my advice wasn't boring.
I'll full reapply the entire hack and still minded trying to create an offline importer/exporter to follow the VB settings.
If pleased, will let you know.

Hope see u soon in FullReleases Area.
Thanks.
  #46  
Old 01-31-2002, 02:12 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First question: you suggest an attachment directory below the document root, like '/home/username/attachments'.
This way, it's outside of the public_html folder, so files can't be accessed and executed via web.
- Does the attachment.php access them without problem ?
- This way isn't necessary yet to change the extension and the nature of the file, is it ?

Thanks again
Bye
  #47  
Old 01-31-2002, 02:20 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

attachment.php is modified to open the file then read the contents so it doesn't have a problem with files below or above document root you could even place it in a directory in the root of the drive as long as php have permission to read and write to that direcotry.

Why would you want to change the extension of the file? If you do then it could become executable, its simplier to name it .file as then it wouldn't be executed
  #48  
Old 01-31-2002, 08:21 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No problem about appending one (or two?) '.file' as extension, even to a random hash to make the filename unpredictable.
I would prefer - and think to modify the hack this way - append all these diversions to the true filename; this way, browsing the dir via ftp or telnet or whatever, I'll suddendly recognize the file and have the perception of what it is...
That's all ....
My need, of course. It shouldn't be too difficult to add the truename to the hash in 3-4 points, I think.
I would it become something like : "filename.ext.hash.file"
Almost unpredictable, bust still recognizable...

Thanks
Bye
  #49  
Old 01-31-2002, 08:47 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh by ftp / telnet i have my own attachment browser in the admin panel

you can get all attachments by users or forums and it lists the attachments and then you can view or download or edit etc, its a tool i found that i use alot.
  #50  
Old 01-31-2002, 09:06 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is the browseatt.php hack ? :supwink:
Otherwise, name and location, please!!!

Thnx
  #51  
Old 01-31-2002, 10:23 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no its something that i wrote it my extensive spare time for someone who paid me for it and i simply use a copy modified slightly for my site.
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:39 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04385 seconds
  • Memory Usage 2,297KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete