vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   HTTPS in all IMG tag links? (https://vborg.vbsupport.ru/showthread.php?t=324741)

DCD.RB 03-15-2017 03:00 PM

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

Stratis 03-15-2017 04:20 PM

Take a look here https://vborg.vbsupport.ru/showthrea...=323946&page=7

Dave 03-15-2017 04:38 PM

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.

z3r0 03-15-2017 06:09 PM

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">

DCD.RB 03-16-2017 08:22 PM

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.

Kane@airrifle 03-16-2017 09:33 PM

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

DCD.RB 03-18-2017 01:12 AM

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

webmastersun 04-10-2017 12:52 PM

Quote:

Originally Posted by DCD.RB (Post 2583898)
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.


All times are GMT. The time now is 10:51 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.01041 seconds
  • Memory Usage 1,726KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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