Note, I think this was a relatively recent change -- previously there was no 
minimum password length.

On Monday, October 17, 2011 11:36:34 PM UTC-4, 黄祥 wrote:
>
> a, i see, so that's my fault part, i've already test your suggestion, and 
> it's work fine.
> thank you so much for your explaination, anthony.
>
>
> On Tue, Oct 18, 2011 at 10:33 AM, Anthony <abas...@gmail.com> wrote:
>
>> Actually, I guess the insert still works, but when the password is shorter 
>> than the min_length, CRYPT converts it to an empty string.
>>
>> Try using 4-character passwords, or set auth.settings.password_min_length 
>> = 1.
>>
>> Anthony
>>
>>
>> On Monday, October 17, 2011 11:30:58 PM UTC-4, Anthony wrote:
>>
>>> auth.settings.password_min_**length defaults to 4, and he's trying to 
>>> insert a 1-character password, so the validation through CRYPT is failing.
>>>
>>> On Monday, October 17, 2011 11:15:35 PM UTC-4, Massimo Di Pierro wrote:
>>>
>>>> In which way it does not work?
>>>>
>>>> On Oct 17, 9:59 pm, 黄祥 <stev...@gmail.com> wrote:
>>>> > Hi all,
>>>> >
>>>> > i've tried using db_wizard_populate to insert the users and it's
>>>> > passwords, in the previous version it's work fine.
>>>> > did anyone have an idea to fixed it?
>>>> >
>>>> > thanks a lot before.
>>>> >
>>>> > ex.
>>>> >
>>>> > # models/db_wizard_populate.py
>>>> > from gluon.contrib.populate import populate
>>>> > if db(db.wiki).isempty():
>>>> >     db.auth_user.bulk_insert([{'**first_name' : 'a',
>>>> >                                'last_name' : 'a',
>>>> >                                'email' : '...@a.com',
>>>> >                                'password' :
>>>> > db.auth_user.password.**validate('a')[0]},
>>>> >                               {'first_name' : 'b',
>>>> >                                'last_name' : 'b',
>>>> >                                'email' : '...@b.com',
>>>> >                                'password' :
>>>> > db.auth_user.password.**validate('b')[0]}])
>>>>
>>>
>

Reply via email to