Skip to content

fix(fail2ban): escape percent signs in 3x-ipl datepattern#4328

Merged
MHSanaei merged 2 commits into
MHSanaei:mainfrom
usk2223:fix-fail2ban-datepattern
May 12, 2026
Merged

fix(fail2ban): escape percent signs in 3x-ipl datepattern#4328
MHSanaei merged 2 commits into
MHSanaei:mainfrom
usk2223:fix-fail2ban-datepattern

Conversation

@usk2223

@usk2223 usk2223 commented May 12, 2026

Copy link
Copy Markdown
Contributor

What is the pull request?

This PR escapes percent signs in the generated 3x-ipl fail2ban filter datepattern.

A previous fix escaped % in the actionban / actionunban date commands, but the generated filter.d/3x-ipl.conf still contains:

datepattern = ^%Y/%m/%d %H:%M:%S

When XUI_ENABLE_FAIL2BAN=true is used in Docker, fail2ban can fail during startup with:

Failed during configuration: '%' must be followed by '%' or '(', found: '%Y/%m/%d %H:%M:%S'

This PR changes the generated datepattern to:

datepattern = ^%%Y/%%m/%%d %%H:%%M:%%S

in both DockerEntrypoint.sh and x-ui.sh.

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

usk2223 added 2 commits May 13, 2026 02:13
fix(fail2ban): escape percent signs in Docker datepattern
fix(fail2ban): escape percent signs in x-ui datepattern
@MHSanaei MHSanaei merged commit 5fb36d3 into MHSanaei:main May 12, 2026
@usk2223 usk2223 deleted the fix-fail2ban-datepattern branch May 13, 2026 00:06
jshir700 pushed a commit to jshir700/3x-ui that referenced this pull request May 28, 2026
)

* Update DockerEntrypoint.sh

fix(fail2ban): escape percent signs in Docker datepattern

* Update x-ui.sh

fix(fail2ban): escape percent signs in x-ui datepattern
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants