News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Embed SWF Issue

Started by MobileCS, February 01, 2018, 12:10:27 PM

Previous topic - Next topic

MobileCS

I'm not longer able to embed SWF files after converting the forum the HTTPS. The file doesn't even attempt to load. I am linking directly to a SWF file off my domain via HTTPS link.

I've verified I can access the link directly without issues, it just does nothing when attempting to use [flash]https://example.com/test.swf[/flash]

There is nothing showing in the nginx error logs or SMF logs.

The only error I see in console is : "Invalid HTML5 DOCTYPE. Consider using the interoperable form "<!DOCTYPE html>".

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

The source code of the post shows :


<embed width="96" height="120" src="http://" type="application/x-shockwave-flash" allowscriptaccess="never" quality="high" loop="true" play="true">
<noembed><a href="http://" target="_blank" class="new_win">http://</a></noembed>

vbgamer45

the src needs to start with https://

Warning SWF is dropped from Chrome so you won't see it also if you use that browser.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

MobileCS

Quote from: vbgamer45 on February 01, 2018, 12:15:13 PM
the src needs to start with https://

Warning SWF is dropped from Chrome so you won't see it also if you use that browser.

The link I am trying to embed does start with https, but that disappears (along with the URL) after I hit the post button.

vbgamer45

The embed code is wrong needs to be https://
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Illori

what exactly is it that disappears?
do you have basic html enabled?

MobileCS

I am using https:// in my embed code. When I hit the post button, nothing embeds and my HTTPS link disappears in the source code and a blank http link appears instead.

I have basic html enabled and never had an issue with embedding SWF on the forum - until I converted the forum to HTTPS.

EDIT: When I modify the post, the proper https link is there with the embed code. So there appears to be a parsing issue with SWF and HTTPS links.


Aleksi "Lex" Kilpinen

Could you give a link to the SWF you are testing on?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

vbgamer45

You would have to make a change to the code SMF code
in sources/subs.php
Line 1199

array(
'tag' => 'flash',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="$2" height="$3"><param name="movie" value="$1" /><param name="play" value="true" /><param name="loop" value="true" /><param name="quality" value="high" /><param name="AllowScriptAccess" value="never" /><embed src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank" class="new_win">$1</a></noembed></object>' : '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank" class="new_win">$1</a></noembed>'),
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';
elseif (strpos($data[0], \'http://\') !== 0 && strpos($data[0], \'https://\') !== 0)
$data[0] = \'http://\' . $data[0];
'),
'disabled_content' => '<a href="$1" target="_blank" class="new_win">$1</a>',
),

I would change to

array(
'tag' => 'flash',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="$2" height="$3"><param name="movie" value="$1" /><param name="play" value="true" /><param name="loop" value="true" /><param name="quality" value="high" /><param name="AllowScriptAccess" value="never" /><embed src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank" class="new_win">$1</a></noembed></object>' : '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank" class="new_win">$1</a></noembed>'),
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';
elseif (strpos($data[0], \'http://\') !== 0 && strpos($data[0], \'https://\') !== 0)
$data[0] = \'https://\' . $data[0];
                                         elseif (strpos($data[0], \'https://\') !== 0)
$data[0] = \'https://\' . $data[0];

'),
'disabled_content' => '<a href="$1" target="_blank" class="new_win">$1</a>',
),
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Aleksi "Lex" Kilpinen

Quote from: vbgamer45 on February 01, 2018, 10:59:10 PM
You would have to make a change to the code SMF code
in sources/subs.php
Line 1199
I haven't been able to test these yet, so would you say this is a bug in 2.0? Sounds like one to me.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

vbgamer45

Possibly haven't confirmed not handling https embeds and using the http version instead.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: