XF 2.3 Only functions with whitelisted prefixes are allowed

Gavo

Member
After updating to 2.3.7 an addon I made no longer works, is there any info on this error documented I cant find anything.


Oops! We ran into some problems.
Line 2: The function getimdbid may not be called in a template. Only functions with whitelisted prefixes are allowed. - Template name: public:imdb

In Template.
Code:
<xf:if is="{$thread.getimdbid("id")}">



Entity
Code:
namespace Imdb\Info\Entity;

class Thread extends XFCP_Thread
    {
    public function getImdbid($imdbget)
        {
        $message = $this->FirstPost->message;
        preg_match('/imdb.com\/title\/tt([0-9]*)/',$message,$matches);
case
switch/return etc.
.......



Thanks
 
Last edited:
Is there any information on whitelisted prefixes? Has this been added in 2.3.7 due to the exploit patch?
 
The case of the method in the template should match (getImbid vs getimbid), but since PHP method names aren't case-sensitive anyway we'll likely be making additional changes here which may relax this constraint in the future.
 
Excellent thanks, I had previously tried this but must have been missing one occurrence in the template so it wouldnt save.

Its linux keep it as intended.
 
Last edited:
Back
Top Bottom