Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
54928e54
Commit
54928e54
authored
Oct 08, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use antispam protection for all actions
parent
b1def088
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
trans/views/edit.py
trans/views/edit.py
+4
-3
No files found.
trans/views/edit.py
View file @
54928e54
...
@@ -243,7 +243,7 @@ def handle_translate(obj, request, user_locked, this_unit_url, next_unit_url):
...
@@ -243,7 +243,7 @@ def handle_translate(obj, request, user_locked, this_unit_url, next_unit_url):
'''
'''
# Antispam protection
# Antispam protection
antispam
=
AntispamForm
(
request
.
POST
)
antispam
=
AntispamForm
(
request
.
POST
)
if
not
request
.
user
.
is_authenticated
()
and
not
antispam
.
is_valid
():
if
not
antispam
.
is_valid
():
# Silently redirect to next entry
# Silently redirect to next entry
return
HttpResponseRedirect
(
next_unit_url
)
return
HttpResponseRedirect
(
next_unit_url
)
...
@@ -555,9 +555,10 @@ def translate(request, project, subproject, lang):
...
@@ -555,9 +555,10 @@ def translate(request, project, subproject, lang):
# Show secondary languages for logged in users
# Show secondary languages for logged in users
if
request
.
user
.
is_authenticated
():
if
request
.
user
.
is_authenticated
():
secondary
=
request
.
user
.
get_profile
().
get_secondary_units
(
unit
)
secondary
=
request
.
user
.
get_profile
().
get_secondary_units
(
unit
)
antispam
=
None
else
:
else
:
secondary
=
None
secondary
=
None
# Spam protection
antispam
=
AntispamForm
()
antispam
=
AntispamForm
()
# Prepare form
# Prepare form
...
...
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