handler.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:Ushio 作者: Hanaasagi 项目源码 文件源码
def post(self):
        #
        # ???????
        # ????session
        #
        password = self.get_body_argument('password', '')
        if password:
            user = yield self.db.user.find_one({
                'username': self.current_user['username']
            })
            _ = md5(password + self.settings['salt'])
            if user['password'] == _.hexdigest():
                if self.get_cookie('TORNADOSESSION'):
                    self.clear_cookie('TORNADOSESSION')
                self.db.user.remove({
                    '_id': ObjectId(self.current_user['_id'])
                })
                self.session.delete('user_session')
                self.redirect('/')
        self.custom_error('????????')
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号