Page MenuHomeFeedback Tracker

htmlLoad no longer supports dynamic URI parameters due to implementation of allowedHTMLLoadURIs
Closed, ResolvedPublic

Description

The example given in https://community.bistudio.com/wiki/htmlLoad example 2 shows the use of URI parameters, for example,

_control htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English"

Where the URI is created via script:

_newsOnline = "http://www.bistudio.com/newsfeed/arma3_news.php?build=" + _build + "&language=" + language;

This works fine if the URL is pointing at bistudio.com (as seen in BIS_fnc_GUInewsfeed).

However, custom URIs no longer work due to the implementation of allowedHTMLLoadURIs config setting in CfgCommands. For example,

_newsOnline = "http://alivemod.com/alive_news.php?map=" + _map + "&mission=" + _mission + "&player=" + _player;

allowedHTMLLoadURIs seems to only accept fixed URIs and not dynamically generated URIs.

Can we please support URI wildcards? i.e. allowedHTMLLoadURIs += {"http://alivemod.com/alive_news.php*"};

This breaks the ALiVE Newsfeed functionality and any other mod that follows your htmlLoad example 2 as documented in the wiki.

Details

Legacy ID
2965805514
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
Engine
Steps To Reproduce

Open a browser and go to http://alivemod.com/alive_news.php?map=altis&mission=altis%20sea%20air%20patrol%20test&player=matt

Edit BIS_fnc_GUInewsfeed to point at a different URL:

http://alivemod.com/alive_news.php?map=altis&mission=altis%20sea%20air%20patrol%20test&player=matt

In RPT:
Web address 'http://alivemod.com/alive_news.php?map=altis&mission=altis%20sea%20air%20patrol%20test&player=matt/' won't be open. Current restrictions do not allowed it.

Add to config:

CfgCommands {

allowedHTMLLoadURIs += {"http://alivemod.com/alive_news.php"};

};

Try again.

In RPT:
Web address 'http://alivemod.com/alive_news.php?map=altis&mission=altis%20sea%20air%20patrol%20test&player=matt/' won't be open. Current restrictions do not allowed it.

Event Timeline

Tupolov edited Steps To Reproduce. (Show Details)Oct 6 2015, 3:07 PM
Tupolov set Category to Engine.
Tupolov set Reproducibility to Always.
Tupolov set Severity to None.
Tupolov set Resolution to Fixed.
Tupolov set Legacy ID to 2965805514.May 8 2016, 12:54 PM
Bohemia added a subscriber: Dwarden.Oct 6 2015, 3:07 PM

Ok, so tested wildcard i.e. (and pleasantly surprised!)

class CfgCommands {

allowedHTMLLoadURIs[] += {
    "http://alivemod.com/alive_news.php*";
};

};

and this appears to work! Thanks!

Close ticket