Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-15-2017, 03:00 PM
DCD.RB DCD.RB is offline
 
Join Date: Jan 2011
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default HTTPS in all IMG tag links?

Hi,
Is there a way to force all links posted in img tags from HTTP to HTTPS?

Thank you
Reply With Quote
  #2  
Old 03-15-2017, 04:20 PM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Take a look here https://vborg.vbsupport.ru/showthrea...=323946&page=7
Reply With Quote
  #3  
Old 03-15-2017, 04:38 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just keep in mind that not all image hosts have support for HTTPS. If you rewrite these links to use HTTPS, it will break the image.
Reply With Quote
  #4  
Old 03-15-2017, 06:09 PM
z3r0's Avatar
z3r0 z3r0 is offline
 
Join Date: Apr 2005
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As Dave says you will break some images as some hosts to not have https, before doing any drastic rewriting, try adding an upgrade-insecure-requests header to your headinclude template and when you browse your forum with a compliant browser such as Chrome or Firefox then it will automatically request the https versions and you can get an idea of the impact that rewriting all the posted images to https will have.

Code:
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
Reply With Quote
2 благодарности(ей) от:
blind-eddie, CAG CheechDogg
  #5  
Old 03-16-2017, 08:22 PM
DCD.RB DCD.RB is offline
 
Join Date: Jan 2011
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, not sure if I'm entirely clear on this.

I only see search & replace query.

What I'm trying to do is when someone posts the code:
[ img ] http://image.com/image.jpg [ /i mg ]

It will automatically transform into an HTTPS link. I'm not concerned about the image being broken here, because the user should notice/realize immediately after when it doesn't properly display.

And for the most part, it seems 90%+ of the image hosts our users use does support HTTPS. They're just pasting in HTTP links, and adding the S has been a manual process I'd like to turn automatic if possible.
Reply With Quote
  #6  
Old 03-16-2017, 09:33 PM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe a replacement variable in Styles & Templates - Replacement Variable Manager?

[img]http:// to [img]https://

The caveat is that the urls would revert if you deleted the RV
Reply With Quote
  #7  
Old 03-18-2017, 01:12 AM
DCD.RB DCD.RB is offline
 
Join Date: Jan 2011
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Perfect, that works. Thank you!

Edit:

Spoke too soon, it will only convert the links upon editing the post, not when it's placed into the tags. Is there a better way?

--------------- Added [DATE]1489865677[/DATE] at [TIME]1489865677[/TIME] ---------------

Just to update, this worked for me:
https://vborg.vbsupport.ru/showthread.php?t=235769

--------------- Added [DATE]1489869070[/DATE] at [TIME]1489869070[/TIME] ---------------

Spoke too soon, that causes the same problem reported here: https://vborg.vbsupport.ru/showpost....17&postcount=5
Reply With Quote
  #8  
Old 04-10-2017, 12:52 PM
webmastersun's Avatar
webmastersun webmastersun is offline
 
Join Date: Oct 2013
Location: www.webmastersun.com
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DCD.RB View Post
Hi,
Is there a way to force all links posted in img tags from HTTP to HTTPS?

Thank you
I don't see any problem with vB 4 when moving to https except sometimes uploading images to the forum is pretty difficult. Maybe I need a faster server.

This is making me to move to a dedicated server with more CPU cores.
Reply With Quote
Reply


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 08:29 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.06764 seconds
  • Memory Usage 2,231KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (2)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete