Fixing bug #4388

specificId from LDAP must not be encoded when it is used in a SQL query
It must be encoded only in a LDAP query