← Back to team overview

maria-developers team mailing list archive

Re: MDEV-6431 review

 

Hi, Sergey!

On Nov 27, Sergey Vojtovich wrote:
> 
> And what I always hated in this validation stuff is that you'll never
> come up with a password that makes it happy. Of course unless you know
> requirements.  In our case requirements are exposed via system
> variables. This is more or less acceptable.

In simple validation plugins requirements are, well, simple and one can
look at system variables. In the cracklib case the warning reports the
exact cracklib error, like in:

Warning  1819 cracklib: it does not contain enough DIFFERENT characters

or

Warning  1819 cracklib: it is based on your username

or

Warning  1819 cracklib: it is based on a dictionary word

I can add a similar warning for the simple plugin too, if needed
(I didn't think it was needed, though).

> > diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
> > index 529a795..cdf8c7b 100644
> > --- a/sql/sql_plugin.cc
> > +++ b/sql/sql_plugin.cc
> > @@ -1051,7 +1055,8 @@ static bool plugin_add(MEM_ROOT *tmp_root,
> >        continue; // invalid plugin type
> >
> >      if (plugin->type == MYSQL_UDF_PLUGIN ||
> > -        (plugin->type == 8 && tmp.plugin_dl->mariaversion == 0))
> > +        (plugin->type == MariaDB_PASSWORD_VALIDATION_INTERFACE_VERSION &&
> > +         tmp.plugin_dl->mariaversion == 0))
> >        continue; // unsupported plugin type
> >
> >      if (name->str && my_strnncoll(system_charset_info,
> You compare type against version here. Why?

Typo, sorry. Fixed.

Regards,
Sergei


References