Elxis CMS Forum

Support => Elxis 4.x/5.x DEV => Topic started by: Amigamerlin on February 23, 2017, 20:26:43

Title: Defender Message - Modification Request
Post by: Amigamerlin on February 23, 2017, 20:26:43
Hello Datahell / you all ... I need your help for doing some modification at defender.class.php             

Currently at line 484 I've 
Code: [Select]
$msg = '[b]You have been banned! If you think this is wrong contact the site administrator.[/b]';
This message, as it is right now, is not useful for the banned users because don't report the e-mail address to contact for the unban request, so I'm forced to manually modify the message in : "You have been banned! If you think this is wrong contact the site administrator: myemail@myisp.com".

What I would like to suggest is to add a feature that add, at the ban message, the  "MAIL_MANAGER_EMAIL" taking it directly from configuration settings.
Moreover  the ban message should be translated in each language.

Please Datahell, can you provide a suggestion how to correctly add "MAIL_MANAGER_EMAIL" parameter in the ban message? 

Can you add this feature, with language translation support, in the next ELXIS release ?

I think this can really help all the users that were wrongly banned.

Let me know.

Thanks in advance.
 
Title: Re: Defender Message - Modification Request
Post by: Amigamerlin on March 23, 2017, 14:04:09
Hello Datahell, no replay from you about.

As I wrote currently the ban message, as it is right now, is not useful for the banned users because don't report the e-mail address to contact for the unban request. Currently I'm forced to manually modify the message in defender.class.php to : "You have been banned! If you think this is wrong contact the site administrator: myemail@myisp.com".

What I suggested is to add a feature that add, at the ban message, the  "MAIL_MANAGER_EMAIL" taking it directly from configuration settings.

Just let me know if this problem is of your interest or not.

PS. The ban message should be also translated in each language.
Title: Re: Defender Message - Modification Request
Post by: datahell on March 23, 2017, 18:52:47
I don't like the idea of showing email addresses to the internet and especially to bad people like those defender bans. No, no, no, very bad idea...

As for translations it cannot be done because the defender runs before elxis core is loaded, so there are no language files available (*). We could add special language files and a language system just for the defender but that would slow down the scanning process. We want the Defender to run fast and not slow down the CMS.

* Language detection would require, among others, the initialization of Elxis URI which means the whole URI parsing process, and loading of the language library (which would also required Elxis framework, sessions, database, etc...). But we dont want these things to get loaded before defender because defender should run first in order to protect what follows.
Title: Re: Defender Message - Modification Request
Post by: Amigamerlin on March 23, 2017, 19:11:53
All clear. I'll continue editing defender.class.php