Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • lemonldap-ng lemonldap-ng
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 311
    • Issues 311
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • LemonLDAP NGLemonLDAP NG
  • lemonldap-nglemonldap-ng
  • Issues
  • #1951
Closed
Open
Issue created Sep 25, 2019 by Clément OUDOT@clement_oudotOwner

Captcha not working on CentOS 7 after ImageMagick upgrade

We have an issue in CentOS with latest GD::Image and ImageMagick modules, the captcha size is always one character:

image

[root@kptn-centos7 ~]# rpm -qa | grep -i magic
ImageMagick-6.7.8.9-18.el7.x86_64
perl-Variable-Magic-0.54-2.el7.x86_64
ImageMagick-perl-6.7.8.9-18.el7.x86_64

I don't have this issue on Ubuntu, with these versions:

root@llng-site:~# dpkg -l | grep -i magick
ii  imagemagick-6-common                       8:6.9.7.4+dfsg-11+deb9u7                     all          image manipulation programs -- infrastructure
ii  libimage-magick-perl                       8:6.9.7.4+dfsg-11+deb9u7                     all          Perl interface to the ImageMagick graphics routines
ii  libimage-magick-q16-perl                   8:6.9.7.4+dfsg-11+deb9u7                     amd64        Perl interface to the ImageMagick graphics routines -- Q16 version
ii  libmagickcore-6.q16-3:amd64                8:6.9.7.4+dfsg-11+deb9u7                     amd64        low-level image manipulation library -- quantum depth Q16
ii  libmagickwand-6.q16-3:amd64                8:6.9.7.4+dfsg-11+deb9u7                     amd64        image manipulation library -- quantum depth Q16
ii  php-imagick

A workaround is to disable ImageMagick for Captcha :

diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm
index c4ee4ee1b..5304528b8 100644
--- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm
+++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm
@@ -1,7 +1,7 @@
 package Lemonldap::NG::Portal::Lib::Captcha;
 
 use strict;
-use GD::SecurityImage use_magick => 1;
+use GD::SecurityImage use_magick => 0;
 use Mouse;
 use MIME::Base64;

But the result is not as good as with ImageMagick.

Assignee
Assign to
Time tracking