Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hardik Juneja
slapos.toolbox
Commits
3cf3f4fa
Commit
3cf3f4fa
authored
Nov 16, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alert user if bad key has been entered.
parent
6f069378
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
slapos/onetimeupload/__init__.py
slapos/onetimeupload/__init__.py
+4
-0
slapos/onetimeupload/templates/badkey.html
slapos/onetimeupload/templates/badkey.html
+3
-0
No files found.
slapos/onetimeupload/__init__.py
View file @
3cf3f4fa
...
...
@@ -104,6 +104,10 @@ def run(config):
if
key
==
config
.
key
:
file
.
save
(
config
.
upload_file
)
return
redirect
(
'/'
)
else
:
# Bad key
template
=
app
.
open_resource
(
'templates/badkey.html'
)
return
template
.
read
()
template
=
app
.
open_resource
(
'templates/index.html'
)
return
template
.
read
()
...
...
slapos/onetimeupload/templates/badkey.html
0 → 100644
View file @
3cf3f4fa
<!doctype html>
<title>
Entered key is not valid
</title>
<h1>
Entered key is not valid. Please go back and try again with correct secret key.
</h1>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment