[DigitalPoint] App for Cloudflare®

[DigitalPoint] App for Cloudflare® 1.9.1.1

No permission to download
I thought I would try this addon again, but still get these messages when I try to access the settings area:

Code:
ErrorException: [E_WARNING] Trying to access array offset on false src/addons/DigitalPoint/Cloudflare/Repository/Cloudflare.php:1081
Generated by: nodle Oct 2, 2024 at 10:40 AM
Stack trace
#0 src/addons/DigitalPoint/Cloudflare/Repository/Cloudflare.php(1081): XF::handlePhpError(2, '[E_WARNING] Try...', '/home/mysite/...', 1081)
#1 src/addons/DigitalPoint/Cloudflare/Repository/Cloudflare.php(787): DigitalPoint\Cloudflare\Repository\CloudflareAbstract->getZoneSettings(NULL, Array)
#2 src/addons/DigitalPoint/Cloudflare/Admin/Controller/Cloudflare.php(49): DigitalPoint\Cloudflare\Repository\CloudflareAbstract->organizeSettings()
#3 src/XF/Mvc/Dispatcher.php(362): DigitalPoint\Cloudflare\Admin\Controller\Cloudflare->actionIndex(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('DigitalPoint\\Cl...', 'Index', Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Cloudflare\Admin\Controller\Cloudflare), NULL)
#5 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Cloudflare\Admin\Controller\Cloudflare), NULL)
#6 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#8 src/XF.php(806): XF\App->run()
#9 admin.php(15): XF::runApp('XF\\Admin\\App')
#10 {main}


Request state
array(4) {
  ["url"] => string(22) "/admin.php?cloudflare/"
  ["referrer"] => string(49) "https://mysite.com/admin.php?logs/server-errors/"
  ["_GET"] => array(1) {
    ["cloudflare/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

I have removed it twice now and reinstalled; I ran into this problem awhile back using it and had to uninstall it. I even contacted my host awhile back and they didn't know as well. Any other options to try?
 
I thought I would try this addon again, but still get these messages when I try to access the settings area:

Code:
ErrorException: [E_WARNING] Trying to access array offset on false src/addons/DigitalPoint/Cloudflare/Repository/Cloudflare.php:1081
Generated by: nodle Oct 2, 2024 at 10:40 AM
Stack trace
#0 src/addons/DigitalPoint/Cloudflare/Repository/Cloudflare.php(1081): XF::handlePhpError(2, '[E_WARNING] Try...', '/home/mysite/...', 1081)
#1 src/addons/DigitalPoint/Cloudflare/Repository/Cloudflare.php(787): DigitalPoint\Cloudflare\Repository\CloudflareAbstract->getZoneSettings(NULL, Array)
#2 src/addons/DigitalPoint/Cloudflare/Admin/Controller/Cloudflare.php(49): DigitalPoint\Cloudflare\Repository\CloudflareAbstract->organizeSettings()
#3 src/XF/Mvc/Dispatcher.php(362): DigitalPoint\Cloudflare\Admin\Controller\Cloudflare->actionIndex(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('DigitalPoint\\Cl...', 'Index', Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Cloudflare\Admin\Controller\Cloudflare), NULL)
#5 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Cloudflare\Admin\Controller\Cloudflare), NULL)
#6 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#8 src/XF.php(806): XF\App->run()
#9 admin.php(15): XF::runApp('XF\\Admin\\App')
#10 {main}


Request state
array(4) {
  ["url"] => string(22) "/admin.php?cloudflare/"
  ["referrer"] => string(49) "https://mysite.com/admin.php?logs/server-errors/"
  ["_GET"] => array(1) {
    ["cloudflare/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

I have removed it twice now and reinstalled; I ran into this problem awhile back using it and had to uninstall it. I even contacted my host awhile back and they didn't know as well. Any other options to try?
Error looks like something you would get if the domain isn’t a zone in your Cloudflare account or couldn’t be accessed by the API token (by “your” I mean the one the API token is for). Couple things to check…
  • Make sure the domain is in your Cloudflare account
  • Are you using a temp/test domain (like localhost or something else not in your Cloudflare account)
  • Check the permissions of your API token (did you set it up so it’s only valid for certain zones or certain IPs?)
 
Error looks like something you would get if the domain isn’t a zone in your Cloudflare account or couldn’t be accessed by the API token (by “your” I mean the one the API token is for). Couple things to check…
  • Make sure the domain is in your Cloudflare account
  • Are you using a temp/test domain (like localhost or something else not in your Cloudflare account)
  • Check the permissions of your API token (did you set it up so it’s only valid for certain zones or certain IPs?)
Yes, the domain is in Cloudflare. No test this is on my live site in signature.

I went through deleted the old token, and went step by step to verify read/edit access. and copied over the new secret key. No it's only setup for one zone and no specific address (see below).

Screenshot 2024-10-02 112113.webp
 
Yes, the domain is in Cloudflare. No test this is on my live site in signature.

I went through deleted the old token, and went step by step to verify read/edit access. and copied over the new secret key. No it's only setup for one zone and no specific address (see below).

View attachment 311876
Assuming that the zone is within the "Fluxoid" account that you restricted it to, not sure...

If you want to be extra sure your permissions are set right, make your API token with this link (permissions are pre-set for what you need):

https://dash.cloudflare.com/profile/api-tokens?permissionGroupKeys=%5B%7B%22key%22%3A%22access%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22access_acct%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22account_analytics%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22analytics%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22billing%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22request_tracer%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22intel%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22bot_management%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22cache%22%2C%22type%22%3A%22purge%22%7D%2C%7B%22key%22%3A%22cache_settings%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22challenge_widgets%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22firewall_services%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22page_rules%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22ssl_and_certificates%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_r2%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_scripts%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone_settings%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone_waf%22%2C%22type%22%3A%22edit%22%7D%5D&name=XenForo
 
Assuming that the zone is within the "Fluxoid" account that you restricted it to, not sure...

If you want to be extra sure your permissions are set right, make your API token with this link (permissions are pre-set for what you need):

https://dash.cloudflare.com/profile/api-tokens?permissionGroupKeys=%5B%7B%22key%22%3A%22access%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22access_acct%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22account_analytics%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22analytics%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22billing%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22request_tracer%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22intel%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22bot_management%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22cache%22%2C%22type%22%3A%22purge%22%7D%2C%7B%22key%22%3A%22cache_settings%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22challenge_widgets%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22firewall_services%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22page_rules%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22ssl_and_certificates%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_r2%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_scripts%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone_settings%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone_waf%22%2C%22type%22%3A%22edit%22%7D%5D&name=XenForo
Ya set to these and same thing. I am at a loss, guess it's just not compatible with my server? 🤷‍♂️
 
We are utiling CF for incoming connections and we already activated CF workers for URL preview but is there anywhere else Xenforo would initiate outgoing connections from the server which would need to be protected to avoid exposing the server IP?
 
We are utiling CF for incoming connections and we already activated CF workers for URL preview but is there anywhere else Xenforo would initiate outgoing connections from the server which would need to be protected to avoid exposing the server IP?
Outbound email is the main one if you are using the server as your outbound mail server. Nothing that Cloudflare or this addon can address though because Cloudflare doesn’t proxy email.
 
we use 3rd party email service so that has been dealt with but we thought we are good until a hacker figured that live preview fetches the URL of the remote server and the real IP is showing in that server's log files as outbound connections are not filtered through CF hence we are wondering if there is any other functions we need to focus on or thats it.
 
we use 3rd party email service so that has been dealt with but we thought we are good until a hacker figured that live preview fetches the URL of the remote server and the real IP is showing in that server's log files as outbound connections are not filtered through CF hence we are wondering if there is any other functions we need to focus on or thats it.
You should be good after you enable image and unfurl proxies with the addon. Those requests will come from Cloudflare IPs as far as anyone trying to figure out the server IP.
 
Do you think it would be useful to get WARP setup so we can lock down everything and only exclude connections towards CF?
 
Do you think it would be useful to get WARP setup so we can lock down everything and only exclude connections towards CF?
You don’t need warp for that… just have your servers only respond to Cloudflare IP blocks and only on port 80 and 443 (that’s exactly what I do). Basically done at the firewall level before the network packet even makes it to the web server.
 
right but outgoing connections are not filtered this way and I'm worried that the way we didnt know about urlfurl we are also missing something else...anyway you say that 2 functions are the ones doing outgoing connections from xenforo by default only?
 
Well if you want to go the route of a full outbound proxy for things you haven’t thought of, I suppose you could. But those things really aren’t going to be things an end user would see (talking about something like software updates/patches for the operating system). I’m really just talking about the application-level (XenForo), not things at the operating system level. It yes… if you are worried about those connections, warp or some other proxy setup could work.
 
A question, now we are proxieing everything using your add on with cloudflare, there is a problem with the Sirupo AD Manager that course this error when you click Logout (if you are logged in as a user) ? Do you have any idea what is conflicting?

Code:
     LogicException: Cannot manipulate data when the session is not started src/XF/Session/Session.php:177
   
     #0 src/XF/Session/Session.php(190): XF\Session\Session->__isset('samCountryIsoCo...')
#1 src/addons/Siropu/AdsManager/Criteria/Geo.php(19): XF\Session\Session->keyExists('samCountryIsoCo...')
#2 src/XF/Container.php(275): Siropu\AdsManager\Criteria\Geo->__construct(Object(XF\Pub\App), Array)
#3 src/XF/App.php(991): XF\Container->createObject('Siropu\\AdsManag...', Array)
#4 src/XF/Container.php(233): XF\App->XF\{closure}('Siropu\\AdsManag...', Array, Object(XF\Container))
#5 src/XF/App.php(3645): XF\Container->create('criteria', 'Siropu\\AdsManag...', Array)
#6 src/addons/Siropu/AdsManager/Entity/Ad.php(458): XF\App->criteria('Siropu\\AdsManag...', Array)
#7 src/addons/Siropu/AdsManager/Template/Ad.php(583): Siropu\AdsManager\Entity\Ad->matchesGeoCriteria()
#8 [internal function]: Siropu\AdsManager\Template\Ad->Siropu\AdsManager\Template\{closure}(Object(Siropu\AdsManager\Entity\Ad))
#9 src/XF/Mvc/Entity/AbstractCollection.php(248): array_filter(Array, Object(Closure))
#10 src/addons/Siropu/AdsManager/Template/Ad.php(577): XF\Mvc\Entity\AbstractCollection->filter(Object(Closure))
#11 src/addons/Siropu/AdsManager/Template/Ad.php(411): Siropu\AdsManager\Template\Ad->prepareAdsForDisplay()
#12 src/addons/Siropu/AdsManager/Template/Ad.php(402): Siropu\AdsManager\Template\Ad->setAds()
#13 src/addons/Siropu/AdsManager/Listener.php(62): Siropu\AdsManager\Template\Ad->__construct(Object(XF\Pub\App), Object(XF\Mvc\Reply\Redirect))
#14 src/XF/Extension.php(86): Siropu\AdsManager\Listener::templaterGlobalData(Object(XF\Pub\App), Array, Object(XF\Mvc\Reply\Redirect))
#15 src/XF/App.php(3368): XF\Extension->fire('templater_globa...', Array, NULL)
#16 src/XF/App.php(2500): XF\App->fire('templater_globa...', Array)
#17 src/XF/App.php(2359): XF\App->getGlobalTemplateData(Object(XF\Mvc\Reply\Redirect))
#18 src/XF/Pub/App.php(495): XF\App->preRender(Object(XF\Mvc\Reply\Redirect), 'html')
#19 src/XF/Mvc/Dispatcher.php(407): XF\Pub\App->preRender(Object(XF\Mvc\Reply\Redirect), 'html')
#20 src/XF/Mvc/Dispatcher.php(66): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\Redirect), 'html')
#21 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#22 src/XF.php(806): XF\App->run()
#23 index.php(23): XF::runApp('XF\\Pub\\App')
#24 {main}
 
It is from the AD Manager 2.0 from Sirupo . But it looks like it is a BUG in his AD Manager - we had Audentio to have a look into it as well and they came with this conclusion:

Sometimes - when you disable an addon vs. outright uninstalling it - it can still interfere with functionality in XF. This includes if there are any references to functions for Siropu's Ads Manager in templates.

In this case, the error is clearly referencing Siropu's Ad Manager: It's attempting to execute the sam_counter function, which is created by Siropu's Ad Manager.

And, as an additional indicator, if I switch to the default XF style - eliminating any custom templating work we've done - and log out, it will still error out.

Obviously, you don't want to just uninstall SAM, as then you'd lose all your ads & settings, but based on the information available it's the best indicator of an issue. It could be as simple as a conflict between SAM and something else, even.
 
Back
Top Bottom