redmica / redmine_ip_filter

3 stars 3 forks source link

IP Address Not Displayed in Invalid IP Address Message #44

Closed maeda-m closed 5 months ago

maeda-m commented 7 months ago

When an invalid IP address is entered and the Save button is clicked, the error message no longer includes the invalid IP address. This issue does not occur in Ruby v2.7, but it does occur in v3.2.

Ruby v2.7 x Redmine v5.1.2 Ruby v3.2 x Redmine v5.1.2
ruby27-error_invalid_ip_addres_format_or_value ruby32-error_invalid_ip_addres_format_or_value

System configuration

redmine_ip_filter

# git log --oneline -3
9345840 (HEAD -> master, origin/master, origin/HEAD) Improve to add IP addresses export/import to the utility (#43)
0d24c38 Enable to add comments (#36)
55a59e4 (tag: v0.0.2) Change version

Ruby v2.7 x Redmine v5.1.2

# gem list | grep ipaddr
ipaddr (default: 1.2.2)

Information - Redmine:

Environment:
  Redmine version                5.1.2.stable.22768
  Ruby version                   2.7.8-p225 (2023-03-30) [aarch64-linux]
  Rails version                  6.1.7.7
  Environment                    development
  Database adapter               PostgreSQL
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
Redmine settings:
  Redmine theme                  Default
SCM:
  Subversion                     1.14.1
  Mercurial                      5.6.1
  Cvs                            1.12.13
  Bazaar                         3.1.0
  Git                            2.30.2
  Filesystem                     
Redmine plugins:
  redmine_ip_filter              0.0.2

Ruby v3.2 x Redmine v5.1.2

# gem list | grep ipaddr
ipaddr (default: 1.2.5)

Information - Redmine:

Environment:
  Redmine version                5.1.2.stable.22768
  Ruby version                   3.2.3-p157 (2024-01-18) [aarch64-linux]
  Rails version                  6.1.7.7
  Environment                    development
  Database adapter               PostgreSQL
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
Redmine settings:
  Redmine theme                  Default
SCM:
  Subversion                     1.14.1
  Mercurial                      5.6.1
  Cvs                            1.12.13
  Bazaar                         3.1.0
  Git                            2.30.2
  Filesystem                     
Redmine plugins:
  redmine_ip_filter              0.0.2
takenory commented 7 months ago

Thanks @maeda-m. I've confirmed the same problem in my environment. So I've posted a PR that solves the problem without depending on the Ruby version and would appreciate your review.

takenory commented 5 months ago

@maeda-m This issue was resolved by PR #45. So I will close this issue. Thanks for your contribution!