• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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