From dea3cebf2e07d51e0bb4b68ad7b669465b2889f5 Mon Sep 17 00:00:00 2001 From: Daniel Aleksandersen Date: Wed, 12 Sep 2018 03:36:42 +0200 Subject: Restore a working User-Agent The previous User-Agent was malformed. Using an old Chrome version now looks more suspicious. This version conforms and passes WAF just fine. --- lib/AppInfo/Application.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib/AppInfo') diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index d633de743..fef3152e3 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -172,13 +172,7 @@ class Application extends App $config = $c->query(Config::class); $proxy = $c->query(ProxyConfigParser::class); - // use chrome's user agent string since mod_security rules - // assume that only browsers can send user agent strings. This - // can lead to blocked feed updates like joomla.org - // For more information see - // https://www.atomicorp.com/wiki/index.php/WAF_309925 - $userAgent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36' . - '(KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36'; + $userAgent = 'NextCloud-News/1.0'; $pico = new PicoFeedConfig(); $pico->setClientUserAgent($userAgent) -- cgit v1.2.3