Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
website
Commits
1e51eaa5
Commit
1e51eaa5
authored
Oct 13, 2016
by
Andreas Valder
Browse files
closes #108
parent
c323c856
Changes
1
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
1e51eaa5
...
...
@@ -76,7 +76,7 @@ def csrf_protect(func):
def
decorator
(
*
args
,
**
kwargs
):
if
'_csrf_token'
in
request
.
values
:
token
=
request
.
values
[
'_csrf_token'
]
elif
'_csrf_token'
in
request
.
get_json
():
elif
request
.
get_json
()
and
(
'_csrf_token'
in
request
.
get_json
()
)
:
token
=
request
.
get_json
()[
'_csrf_token'
]
else
:
token
=
none
...
...
@@ -468,10 +468,12 @@ def create(table):
if
column
in
tabs
[
table
][
3
]:
columns
.
append
(
column
)
values
.
append
(
val
)
args
=
request
.
values
args
=
request
.
values
.
items
()
if
(
request
.
method
==
'POST'
)
and
(
request
.
get_json
()):
args
=
request
.
get_json
().
items
()
print
(
args
)
for
column
,
val
in
args
:
print
(
column
,
val
)
if
(
column
==
'ref'
)
or
(
column
==
'_csrf_token'
):
continue
assert
column
in
tabs
[
table
][
2
]
+
tabs
[
table
][
3
]
...
...
@@ -593,5 +595,6 @@ import sorter
if
'ICAL_URL'
in
config
:
import
meetings
import
l2pauth
import
jobs
if
'JOBS_API_KEY'
in
config
:
import
jobs
import
timetable
Write
Preview
Supports
Markdown
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