Can you attach a minimal app that reproduces the problem (preferably in the 
current stable version of web2py)?

As an aside, instead of using your reverse() function, to reverse a string, 
you can do mystring[::-1].

Anthony

On Tuesday, August 6, 2013 4:08:26 PM UTC-4, Annet wrote:
>
> The think the problem is caused by these functions that generate the 
> password:
>
>
> def generate_password(name,now):
>     import random
>     value=''
>     chars=('ABCDEFGHJKLMNOPQRSTUVW')
>     symbols=('~!@#$%^&*()_+-=?<>:;{}[]|')
>     x1=random.choice(chars)
>     y=len(name)
>     if y<3:
>         x2=reverse(name)
>     else:
>         z=y-3
>         x2=reverse(name[z:y])
>     x3=random.choice(chars)
>     x4=random.choice(symbols)
>     x5=reverse(now)
>     value=value+x1+x2+x3+x4+x5
>     return value
>
>
> def reverse(x):
>     i=len(x)
>     value=''
>     while i > 0:
>         value=value+x[i-1]
>         i=i-1
>     return value
>
>
> When I replace return value with return '6#TestValue'
> The functions works i.e. it inserts '6#TestValue' into the auth_user table
> and sends the value to the user.
>
> I hope you know what's wrong with this value this function returns?
>
>
> Kind regards,
>
> Annet
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to