Very good, some plugins are not resolved through the https protocol, using your plugin
FriendsOfFlarum Secure HTTPS
Great extension! Works just fine.
ValiantShishu What do you mean by "plugins" ? This extension should only affect images.
datitisev Sorry, I may have expressed an error. Some pictures have an unsafe logo in the case of https. I solved it with your extension.
- Edited
How Do I fix this?
Package "fof/secure-https" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- intervention/image 2.5.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- intervention/image 2.5.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- intervention/image 2.5.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- Installation request for intervention/image (locked at 2.5.0) -> satisfiable by intervention/image[2.5.0].
To enable extensions, verify that they are enabled in your .ini files:
- /opt/alt/php71/etc/php.ini
- /opt/alt/php71/link/conf/alt_php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
SpacellaGaming You need the php extension fileinfo
in your system. It depends on your Linux distribution on how you install it, I recommend looking up how to do so online. Do make sure it is for php 7.1 though, as that is what you are using.
The github/packagist links in this post both link to the formatting extension instead of secure-https
cmcjacob good spot! I’ve nudged @datitisev regarding this
Could this be made compatible with this GIFs extension? https://discuss.flarum.org/d/23101-gifs
I like GIFs.
With this extension installed, the GIFs break (404 error).
- Edited
With this extension:
https://www.sitbreathe.be/api/fof/secure-https/https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2F13DMEAmpAngKDC%2Fgiphy-downsized.gif%3Fcid%3D41e3ab5fqj88y8qsqr1h6lp1osn4t4qd556slr360etooi1u%26rid%3Dgiphy-downsized.gif
Without:
https://media2.giphy.com/media/lkK7hFTOp1s4g/giphy.gif?cid=41e3ab5flt7uolqt9u699djyl6zft88rjqdgc3qzfu0j9k02&rid=giphy.gif
P.S. I don’t have any issues with regular images and other embeds with this extension enabled. Maybe Giphy does something weird on their end which makes things like this not work. Who knows.
0.2.0
- beta 14 ready
Update
composer require fof/secure-https:^0.2.0
php flarum cache:clear
0.2.1
- address early resolving issue, which resulted in 404 errors for extensions loaded afterwards (@Communitybuilder @shaggykiwi @Pollux ) - Thank you @clarkwinkelmann for discovering the problem
️
Updating
composer require fof/secure-https:^0.2.1
karaok yayyyy from now i wanna become a bounty tracker for karaok <3
0.3.0
- Flarum beta 15 support
Error on beta.15:
flarum.ERROR: RuntimeException: Tag 'IMG' does not exist in /app/vendor/s9e/text-formatter/src/Configurator/Collections/TagCollection.php:34
Stack trace:
#0 /app/vendor/s9e/text-formatter/src/Configurator/Collections/NormalizedCollection.php(185): s9e\TextFormatter\Configurator\Collections\TagCollection->getNotExistException('IMG')
#1 /app/vendor/s9e/text-formatter/src/Configurator/Collections/NormalizedCollection.php(241): s9e\TextFormatter\Configurator\Collections\NormalizedCollection->get('IMG')
#2 /app/vendor/fof/secure-https/src/Listeners/ModifyContentHtml.php(42): s9e\TextFormatter\Configurator\Collections\NormalizedCollection->offsetGet('IMG')
#3 /app/vendor/illuminate/events/Dispatcher.php(369): FoF\SecureHttps\Listeners\ModifyContentHtml->configuring(Object(Flarum\Formatter\Event\Configuring))
#4 /app/vendor/illuminate/events/Dispatcher.php(218): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}('Flarum\\Formatte...', Array)
#5 /app/vendor/flarum/core/src/Formatter/Formatter.php(157): Illuminate\Events\Dispatcher->dispatch('Flarum\\Formatte...')
#6 /app/vendor/flarum/core/src/Formatter/Formatter.php(192): Flarum\Formatter\Formatter->getConfigurator()
#7 /app/vendor/illuminate/cache/Repository.php(418): Flarum\Formatter\Formatter->Flarum\Formatter\{closure}()
#8 /app/vendor/flarum/core/src/Formatter/Formatter.php(193): Illuminate\Cache\Repository->rememberForever('flarum.formatte...', Object(Closure))
#9 /app/vendor/flarum/core/src/Formatter/Formatter.php(236): Flarum\Formatter\Formatter->getComponent('js')
#10 /app/vendor/flarum/core/src/Forum/ForumServiceProvider.php(105): Flarum\Formatter\Formatter->getJs()
#11 [internal function]: Flarum\Forum\ForumServiceProvider->Flarum\Forum\{closure}()
#12 /app/vendor/flarum/core/src/Frontend/Compiler/Source/StringSource.php(35): call_user_func(Object(Closure))
#13 /app/vendor/flarum/core/src/Frontend/Compiler/Source/StringSource.php(46): Flarum\Frontend\Compiler\Source\StringSource->getContent()
#14 /app/vendor/flarum/core/src/Frontend/Compiler/RevisionCompiler.php(239): Flarum\Frontend\Compiler\Source\StringSource->getCacheDifferentiator()
#15 /app/vendor/flarum/core/src/Frontend/Compiler/RevisionCompiler.php(73): Flarum\Frontend\Compiler\RevisionCompiler->calculateRevision(Array)
#16 /app/vendor/flarum/core/src/Frontend/Compiler/RevisionCompiler.php(125): Flarum\Frontend\Compiler\RevisionCompiler->commit()
#17 /app/vendor/fof/nightmode/src/Content/Assets.php(119): Flarum\Frontend\Compiler\RevisionCompiler->getUrl()
#18 [internal function]: FoF\NightMode\Content\Assets->FoF\NightMode\Content\{closure}(Object(Flarum\Frontend\Compiler\JsCompiler))
#19 /app/vendor/fof/nightmode/src/Content/Assets.php(120): array_map(Object(Closure), Array)
#20 /app/vendor/fof/nightmode/src/Content/Assets.php(55): FoF\NightMode\Content\Assets->getUrls(Array)
#21 /app/vendor/flarum/core/src/Frontend/Frontend.php(63): FoF\NightMode\Content\Assets->__invoke(Object(Flarum\Frontend\Document), Object(Laminas\Diactoros\ServerRequest))
#22 /app/vendor/flarum/core/src/Frontend/Frontend.php(55): Flarum\Frontend\Frontend->populate(Object(Flarum\Frontend\Document), Object(Laminas\Diactoros\ServerRequest))
#23 /app/vendor/flarum/core/src/Frontend/Controller.php(32): Flarum\Frontend\Frontend->document(Object(Laminas\Diactoros\ServerRequest))
#24 /app/vendor/flarum/core/src/Http/RouteHandlerFactory.php(38): Flarum\Frontend\Controller->handle(Object(Laminas\Diactoros\ServerRequest))
#25 /app/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}(Object(Laminas\Diactoros\ServerRequest), Array)
#26 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ExecuteRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Closure))
#27 /app/vendor/fof/oauth/src/Middleware/ErrorHandler.php(50): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#28 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): FoF\OAuth\Middleware\ErrorHandler->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#29 /app/vendor/fof/masquerade/src/Middleware/DemandProfileCompletion.php(58): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#30 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): FoF\Masquerade\Middleware\DemandProfileCompletion->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#31 /app/vendor/fof/secure-https/src/Middlewares/ContentSecurityPolicyMiddleware.php(32): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#32 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): FoF\SecureHttps\Middlewares\ContentSecurityPolicyMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#33 /app/vendor/flarum/core/src/Http/Middleware/ShareErrorsFromSession.php(57): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#34 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ShareErrorsFromSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#35 /app/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(40): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#36 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#37 /app/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(67): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#38 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ResolveRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#39 /app/vendor/flarum/core/src/Http/Middleware/SetLocale.php(50): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#40 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\SetLocale->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#41 /app/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(32): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#42 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#43 /app/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(51): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#44 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\RememberFromCookie->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#45 /app/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#46 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\StartSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#47 /app/vendor/flarum/core/src/Http/Middleware/CollectGarbage.php(46): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#48 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\CollectGarbage->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#49 /app/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#50 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ParseJsonBody->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#51 /app/vendor/migratetoflarum/canonical/src/Middlewares/CanonicalRedirectMiddleware.php(49): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#52 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): MigrateToFlarum\Canonical\Middlewares\CanonicalRedirectMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#53 /app/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#54 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\HandleErrors->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#55 /app/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#56 /app/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#57 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\RequestHandler->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#58 /app/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#59 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePathRouter->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#60 /app/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(42): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#61 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Laminas\Stratigility\Middleware\OriginalMessages->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#62 /app/vendor/middlewares/base-path/src/BasePath.php(53): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#63 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePath->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#64 /app/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#65 /app/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(73): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\EmptyPipelineHandler))
#66 /app/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle(Object(Laminas\Diactoros\ServerRequest))
#67 /app/vendor/flarum/core/src/Http/Server.php(42): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#68 /app/public/index.php(22): Flarum\Http\Server->listen()
#69 {main}
Makes the forum unable to load. When disabling this extension, everything's okay. Not sure what went wrong, I am happy to provide more info if needed. Might be FreeFlarum's PHP version, or that we have outdated package(s) with missing functions.
- Edited
SKevo I think this error happens if bbcode and/or markdown are disabled, or if they are enabled after this extension. Enable bbcode/markdown first, then this extension.
We might need better error handling for that, or maybe use the extension requirement feature of Flarum beta 14.
clarkwinkelmann I'd suggest to use the requirement feature. It's quick, plus many people (FreeFlarum forum admins included) do not know about the loading order.
SKevo I don't know much about this extension, so I can't say for sure.
If the extension works with either bbcode or markdown, then we can't use the feature because that would force users of the extensions to enable a particular one or both when they might only want one of the two.
If this extension only works with one of them however using the feature to depend on the other extension would make total sense.
We could possibly to a custom check in the onEnable hook of the extension, similarly to how extension dependencies work.