+ old_pwd = user_info.get("old_password")
+ user_data = self.db.get_one(
+ self.users_collection, {BaseTopic.id_field("users", uid): uid}
+ )
+ if old_pwd:
+ salt = user_data["_admin"]["salt"]
+ shadow_password = sha256(old_pwd.encode('utf-8') + salt.encode('utf-8')).hexdigest()
+ if shadow_password != user_data["password"]:
+ raise AuthconnConflictException(
+ "Incorrect password",
+ http_code=HTTPStatus.CONFLICT
+ )