Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Attachment and avatar hotlinking protection (1.0.1) Details »»
Attachment and avatar hotlinking protection (1.0.1)
Version: 1.00, by fury fury is offline
Developer Last Online: Sep 2018 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-02-2003 Last Update: Never Installs: 12
 
No support by the author.

Support in this thread or by email (preferrably thread)

vBulletin 2.2.x (tested on 2.2.9)

Prevents people from linking to attachments and custom avatars on your forum from other sites.

Example:
Attachment hotlinking protection: Click and watch the redirection message. You are then taken straight to the post containing the attachment.

Custom avatar hotlinking protection: Click and watch the redirection message again. This time you are taken to the user's profile.

When the attachment is linked to via an img tag, it is shown as a red x in IE, or a torn paper in Mozilla.

Modifications:
2 file modifications
/forum/attachment.php
/forum/avatar.php
1 new template
redirect_wrongreferrer

Updates since 1.0:
Added custom avatar hotlinking protection

Modifications since last version:
2 file modifications
/forum/attachment.php
/forum/avatar.php
1 template modification
redirect_wrongreferrer

For upgrade instructions see the text file.

Note for people who have problems getting the avatar hotlinking protection to work: Try this code in the avatar.php modification instead of mine

Show Your Support

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

Comments
  #12  
Old 01-03-2003, 02:59 PM
Schorsch's Avatar
Schorsch Schorsch is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just installed, works fine.

Thanks
Reply With Quote
  #13  
Old 01-03-2003, 03:00 PM
w596 w596 is offline
 
Join Date: Jul 2002
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes you did see that... I posted the question early this morning but found what I was looking for in another thread, then deleted my post. Sorry about that. lol
Reply With Quote
  #14  
Old 01-03-2003, 03:10 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe the same code can be used for avatar.php to protect avatars
Reply With Quote
  #15  
Old 01-03-2003, 03:40 PM
fury's Avatar
fury fury is offline
 
Join Date: Oct 2001
Location: Indiana
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, I think I will add that to the hack.
Reply With Quote
  #16  
Old 01-03-2003, 04:28 PM
fury's Avatar
fury fury is offline
 
Join Date: Oct 2001
Location: Indiana
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hack has been updated to include custom avatar hotlinking protection. See the first post for info, or grab the text file for upgrade instructions
Reply With Quote
  #17  
Old 01-03-2003, 04:46 PM
nuno's Avatar
nuno nuno is offline
 
Join Date: Oct 2001
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No joy fury
Apache test log file
Code:
[Fri Jan 03 10:43:59 2003] [error] PHP Notice:  Undefined index:  HTTP_REFERER in c:\apache\htdocs\avatar.php on line 6
[Fri Jan 03 10:43:59 2003] [error] PHP Notice:  Use of undefined constant host - assumed 'host' in c:\apache\htdocs\avatar.php on line 8
[Fri Jan 03 10:43:59 2003] [error] PHP Notice:  Undefined index:  host in c:\apache\htdocs\avatar.php on line 8
Reply With Quote
  #18  
Old 01-03-2003, 04:55 PM
fury's Avatar
fury fury is offline
 
Join Date: Oct 2001
Location: Indiana
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Weird...

Does the attachment hotlinking protection work on the same server?

You got an MSN messenger addy I can contact you at? If not, just send me your avatar.php to dennis@xibase.com and I'll take a look at it
Reply With Quote
  #19  
Old 01-03-2003, 04:58 PM
nuno's Avatar
nuno nuno is offline
 
Join Date: Oct 2001
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

fury, the avatar hotlinking is not working at otcentral as well, after the redirect message you get kicked to profile page and the avatar is broken.
Check your log files.
Reply With Quote
  #20  
Old 01-03-2003, 05:03 PM
nuno's Avatar
nuno nuno is offline
 
Join Date: Oct 2001
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Attachment hotlinking is working flawlessly, so it went to live forums.
Avatar hotlinking is being tested at localhost.
Reply With Quote
  #21  
Old 01-03-2003, 05:05 PM
fury's Avatar
fury fury is offline
 
Join Date: Oct 2001
Location: Indiana
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Avatar hotlinking seems to be working fine for me on both localhost and live server...

Try this: Move this line
Code:
set_magic_quotes_runtime(0);
to just above
Code:
$c_url = parse_url($GLOBALS[HTTP_REFERER]);
Reply With Quote
Reply

Thread Tools

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 07:41 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08709 seconds
  • Memory Usage 2,293KB
  • 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
  • (3)bbcode_code
  • (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
  • (3)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