vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   attachment filename as hash (https://vborg.vbsupport.ru/showthread.php?t=148609)

medienleben 05-31-2007 08:53 PM

attachment filename as hash
 
hi, i needed to have the attachments on the file system, but this is now a problem cause the filenames are only increased, so if someone wants to download all attachments, hea has only to make donload all attachments from 1 to...
i would need somehow to create the filename as a hash, or random unique, somehow, is it possible?
thx

Wayne Luke 05-31-2007 10:57 PM

Each attachment already has a 32 digit filehash stored in the database. This is how vBulletin checks for duplicate attachments.

medienleben 06-04-2007 03:31 PM

Quote:

Originally Posted by Wayne Luke (Post 1258643)
Each attachment already has a 32 digit filehash stored in the database. This is how vBulletin checks for duplicate attachments.

no, i mean it like this...
i have path: /var/www/vbulletin/atatchments/

and there are all the attachments stored as: 1/1.attach, 1/2.attach...

and if someone runs wget or any other downloader for 1-n he can download all the attachments, i would need something like:

1/hash.jpg

if this is not done, it is a big security issue for those that have the files stored on fs

Wayne Luke 06-04-2007 04:09 PM

Store you attachments in /var instead of /var/www/vbulletin/attachments. Or place an .htaccess deny from all in the attachments directory. Then someone won't be able to download them all.

medienleben 06-04-2007 05:30 PM

Quote:

Originally Posted by Wayne Luke (Post 1261094)
Store you attachments in /var instead of /var/www/vbulletin/attachments. Or place an .htaccess deny from all in the attachments directory. Then someone won't be able to download them all.

lol, and how can i use it then on the forum??

Wayne Luke 06-04-2007 05:55 PM

They are recalled via a PHP file so the browser doesn't access them directly.

medienleben 06-04-2007 06:47 PM

your right, i ment that they are called directly, thx:)


All times are GMT. The time now is 09:42 AM.

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.01685 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete