PDA

View Full Version : trying to mod download.php


voogru
21 Apr 2002, 21:05
trying to mod this download.php to reject members who havent been authed by the email.

heres what i got:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



however when i do that i did a test user and i was still able to download the file.

any ideas?

Steve Machol
21 Apr 2002, 21:16
Out of curiousity why don't you just set the appropriate permissions for the 'Users Awaiting Email Confirmation' group? Just set 'Can download attachments' to 'No'.

voogru
21 Apr 2002, 21:20
no, the download.php is an external file from vbulletin, my can download attachments is already at "no"

Steve Machol
21 Apr 2002, 21:24
Ah, ok. I should have noticed this wasn't a normal vB file!

voogru
21 Apr 2002, 21:29
especially with the


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


up top hehe :D

anyways still looking for a solution :)

voogru
22 Apr 2002, 01:37
I seemed to fix this by totally re-doing my download.php and putting it in my forums directory. anyways heres what i did:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



i love meta refresh hehe :D anyways feel free to use it, just change the address, also the to link to the file:

Usage:

if you have www.domain.com/files/yap.zip you would make the link:
http://www.domain.com/forum/download.php?file=yap.zip
if you have a link like:
www.domain.com/files/coolstuff/yap.zip you would make the link:
http://forums.voogru.com/download.php?file=coolstuff/yap.zip and ect.

*wonder if this would qualify as a hack :paranoid:

Chen
22 Apr 2002, 12:50
What's the point in this hack if you can see the filename in the URL? You can just go straight to it without using download.php.

voogru
22 Apr 2002, 20:08
you dont understand it, if you set the ure to refresh to like



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



when you link to the file you would put.
download.php?file=yap.zip and it would access


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


i just put the main dir as an example, the file could be called from anywhere on the server only showing the path and file after the directory where the files are hiden, i cant really explain it that well :ermm:

Chen
23 Apr 2002, 13:00
In that case don't use META tags, it's very easy to find them out (just view the HTML source!). Use PHP's header() function. (i.e header('Location: yourfile');) :)

voogru
23 Apr 2002, 15:31
yeah but they will have to be quick if u set the refresh to 0

Chen
23 Apr 2002, 15:39
You can "Save Target As..." and have the HTML page downloaded to your computer.

voogru
23 Apr 2002, 16:01
Ill play with that header thing once my site gets back up, sites going
down everyday now :angry:

voogru
23 Apr 2002, 16:12
wow thanks FireFly, i got it working :)



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

voogru
23 Apr 2002, 16:40
hmm, vbulletin paresed it :confused: anyways thanks, and i got it working without the meta-refresh now :)