[Tutor] GET function not executed

Peter Otten __peter__ at web.de
Sun Oct 18 05:21:21 EDT 2015


Peter Otten wrote:

> The use of {...} makes this a set literal, and the order of the items in a
> set is undefined. To prevent a class of attacks on web applications it may
> even change between invocations:

Sorry, I forgot to include the source of setdemo.py. It contains just one 
line:

print {'/', 'index'}

 
> $ for i in {1..10}; do echo -n "PYTHONHASHSEED=$i --> "; PYTHONHASHSEED=$i
> python setdemo.py; done
> PYTHONHASHSEED=1 --> set(['index', '/'])
> PYTHONHASHSEED=2 --> set(['/', 'index'])
> PYTHONHASHSEED=3 --> set(['index', '/'])
> PYTHONHASHSEED=4 --> set(['index', '/'])
> PYTHONHASHSEED=5 --> set(['/', 'index'])
> PYTHONHASHSEED=6 --> set(['/', 'index'])
> PYTHONHASHSEED=7 --> set(['index', '/'])
> PYTHONHASHSEED=8 --> set(['/', 'index'])
> PYTHONHASHSEED=9 --> set(['index', '/'])
> PYTHONHASHSEED=10 --> set(['index', '/'])
 




More information about the Tutor mailing list