[TYPO3-english] TYPO3 behind a CDN and checkValidBrowserOrDie() ("Your browser version looks incompatible with this TYPO3 version")
Michael Schams
typo3 at 2016.schams.net
Fri Jan 8 04:56:46 CET 2016
Ok, by setting my own custom user-agent string in file
AdditionalConfiguration.php,
the BE login works (accessing the BE via the CDN):
$userAgent = 'Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
Firefox/38.0 Iceweasel/38.5.0';
$GLOBALS['CLIENT']['BROWSER'] = $userAgent;
Unfortunately, this is not the only spot in TYPO3 where the
browser/os/version
is checked by accessing variable $_SERVER['HTTP_USER_AGENT']. The next
problem is that the RTE is not loaded, if the user-agent is "AWS
CloudFront".
If I add the following line to AdditionalConfiguration.php, the RTE
comes up:
$_SERVER['HTTP_USER_AGENT'] = $userAgent;
However, overwriting *this* variable is a bad idea I suspect.
Is there any chance to force the RTE to load, no matter which user-agent
string the browser sent?
BTW: an update to 7 is sadly not an option at this point in time.
Cheers
Michael
On 2015-12-23 03:10, Jigal van Hemert wrote:
> Hi,
>
> On 22/12/2015 13:01, Michael Schams wrote:
>> Nevertheless I wonder what the purpose of the browser check for the BE
>> is? :-) I mean, we are not testing against a specific version, but
>> only
>> against a string such as "IE". If someone tries to access the BE of
>> 7.6
>> with IE6, he passes the test (but we dropped the support for IE6 a
>> long
>> time ago). If someone tries to access the BE with an up-to-date
>> browser
>> and the TYPO3 instance is behind a proxy (e.g. a CDN), the test likely
>> fails. So what's the point of checkValidBrowserOrDie()?
>
> It's probably very old code. Anyways, it's been removed in 7LTS:
>
> https://review.typo3.org/41261
>
> So, another solution would be to upgrade to 7 :)
--
Cheers
Michael
More information about the TYPO3-english
mailing list