Problem/Motivation

If I browse to /admin/config/cookie_bot_protection/settings and fill the "Url protected patterns" field, it will fill the config with a string:

url_protected_patterns: "foo\r\nbar"

But according the config schema, it should be an array.

Steps to reproduce

Proposed resolution

Explode the string in SettingsForm::submitForm().

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

prudloff created an issue. See original summary.

prudloff’s picture

Status: Active » Needs review

I had to use a trim because the browser can send \r\n line breaks and PHP_EOL can be just \n depending on the OS. So it could leave dangling \r characters.

pilulu made their first commit to this issue’s fork.

pilulu’s picture

Status: Needs review » Fixed

It works like a charm.
Thanks a lot.

I've also noticed sometimes the line breaks that you have mentionned.

pilulu’s picture

Version: 1.0.5 » 1.0.6
Status: Fixed » Closed (fixed)