• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Forwarded to devs Can save modsecurity config when user use french language

fabkim

New Pleskian
Username:

TITLE


Can save modsecurity config when user use french language

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk Obsidian 18.0.41
Ubuntu 20

PROBLEM DESCRIPTION

When user use french language, modsecurity configuration can't be saved

STEPS TO REPRODUCE

  • In "Tools & Settings" > "Plesk Appearance" > "Languages", set "fr-FR" as default language
  • In "Profile & preferences", selecte "Français" as administrator's language and save
  • Go in "Outils & paramètres" > "Pare-feu applicatif (modsecurity)" and try to save, this don't work

ACTUAL RESULT

Saving don't work

EXPECTED RESULT

Saving should work

ANY ADDITIONAL INFORMATION

In Chrome dev console, you can see this error :
Code:
Uncaught SyntaxError: missing ) after argument list
    at general:431:64
    at Array.forEach (<anonymous>)
    at general:431:18

When going to "sources" tab :
Code:
    AdminPanel.WebAppFirewall.confirmation = function () {
        const data = {"currentWebServer":"apache","currentRuleSet":"comodo_free","isCustomized":true,"needPresetWarning":false};
        const {currentWebServer, currentRuleSet, isCustomized, needPresetWarning} = data;
        const messages = [];

        if (document.getElementById('ruleEngine-DetectionOnly').checked && needPresetWarning) {
            messages.push('L'activation des deux options Détection uniquement et Complet peut entraîner des difficultés liées au <a href="https://github.com/SpiderLabs/ModSecurity/issues/562" target="_blank"> problème ModSecurity</a>, par exemple, un site WordPress qui ne fonctionne pas.');
        }

Error is on the messages.push, the french sentence uses unslashed single quote character

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
Last edited by a moderator:
Thank you.
The bug confirmed: PPPM-13394

As a workaround:

1. Backup current localization file:
cp -a /opt/psa/admin/application/default/resources/languages/fr-FR/components/forms.php{,.bak}

2. Upload, unzip and replace attached forms.php to
/opt/psa/admin/application/default/resources/languages/fr-FR/components/forms.php

On the test server, the Modsecurity configuration was applied successfully then.
 

Attachments

  • forms.php.zip
    25.9 KB · Views: 2
Back
Top