phpMyFAQ icon indicating copy to clipboard operation
phpMyFAQ copied to clipboard

Images loading via HTTPS when the site is just HTTP

Open HOCO-gawing opened this issue 3 years ago • 6 comments

I assume this is related to the issue where the images weren't loading in 3.2. I've installed 3.2.1, and it still isn't correct. My site uses HTTP. It is just an internal site, so I don't need to use HTTPS. When I edit a FAQ, I can see the images, and if I view the code, it is loading through HTTP. If I check the database, it shows that the images are HTTP. However, when I view the FAQ through the regular web page, the images don't load. If I check the code on that page, it shows it is loading through HTTPS. This has only been an issue since the upgrade to 3.2.x

HOCO-gawing avatar Sep 27 '23 13:09 HOCO-gawing

So you see <img src="https://<path to the image>"> instead of <img src="http://<path to the image>"> in the frontend?

thorsten avatar Sep 27 '23 14:09 thorsten

Yes. When I'm composing/editing, and I view the HTML for that page, I see and I can see the image fine. When I use phpMyAdmin to view the database, I see When I am viewing the FAQ on the public page, I see and I don't see the image

On Wed, Sep 27, 2023 at 10:08 AM Thorsten Rinne @.***> wrote:

So you see instead of in the frontend?

— Reply to this email directly, view it on GitHub https://github.com/thorsten/phpMyFAQ/issues/2661#issuecomment-1737475806, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6LPJV4ZCS3PBVFXYKQI32LX4QXNLANCNFSM6AAAAAA5JMGC64 . You are receiving this because you authored the thread.Message ID: @.***>

HOCO-gawing avatar Sep 27 '23 14:09 HOCO-gawing

That's weird.

thorsten avatar Sep 27 '23 14:09 thorsten

Could you please try to open this file:

src/phpMyFAQ/Helper/FaqHelper.php

Go to line 253 and change the line

            ->allowMediaSchemes(['https', 'http', 'mailto', 'data'])

to

            ->allowMediaSchemes(['http', 'https', 'mailto', 'data'])

and try it again.

thorsten avatar Sep 27 '23 14:09 thorsten

That did not work.

Attached is a screenshot that shows the live view of the FAQ. You can see by the address bar that it is not secure. You can see that the image is not appear, and you can see the code that shows it is https

On Wed, Sep 27, 2023 at 10:41 AM Thorsten Rinne @.***> wrote:

Could you please try to open this file:

src/phpMyFAQ/Helper/FaqHelper.php

Go to line 253 and change the line

        ->allowMediaSchemes(['https', 'http', 'mailto', 'data'])

to

        ->allowMediaSchemes(['http', 'https', 'mailto', 'data'])

and try it again.

— Reply to this email directly, view it on GitHub https://github.com/thorsten/phpMyFAQ/issues/2661#issuecomment-1737542683, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6LPJV3BAXHOXG57C3FQFVLX4Q3K5ANCNFSM6AAAAAA5JMGC64 . You are receiving this because you authored the thread.Message ID: @.***>

HOCO-gawing avatar Sep 27 '23 14:09 HOCO-gawing

Found the bug, thanks for the hint!

thorsten avatar Sep 27 '23 15:09 thorsten