Example #1
0
 def post(self):
     upload_files = self.get_uploads()
     user_passphrase = self.request.get("passphrase")
     user_passphrase = VaultHash.hash(user_passphrase)
     if not user_passphrase or not upload_files:
         self.redirect("/")
         return
     blob_info = upload_files[0]
     logging.error(blob_info)
     passphrase = Passphrase(blob=blob_info.key(), passphrase=user_passphrase)
     passphrase.put()
     self.redirect("/success")
Example #2
0
 def post(self):
     user_passphrase = self.request.get("passphrase")
     passphrase_hash = VaultHash.hash(user_passphrase)
     self.response.headers.add_header("Set-Cookie", "passphrase=%s; Path=/" % passphrase_hash)
     self.redirect("/stash")