I have the following table definition:

db.define_table('person',
                Field('email',requires=IS_NOT_IN_DB(db,'person.email')),
                Field('password',requires=[CRYPT(salt=False)]),
                Field('reg_key'))

I have the following function definition for a REST service:

@request.restful()
def api():
    response.view = 'generic.json'
    def PUT(table_name,record_id,**vars):
        return db(db[table_name]._id==record_id).update(**vars)
    return locals()

I execute this command:

curl -k -X PUT -d "password=Ferrari" 
https://67.213.70.251/tut_server/default/api/person/7

I expect 'Ferrari' to be encrypted in the database after update, but I find 
plaintext instead. This doesn't seem right to me.

What have I done wrong?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to