Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Kirill Smelkov
Zope
Commits
0719961b
Commit
0719961b
authored
Mar 21, 2007
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #2294: 'requestmethod' protection for DOS-able ControlPanel methods.
parent
d8573ace
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
lib/python/App/ApplicationManager.py
lib/python/App/ApplicationManager.py
+7
-1
No files found.
lib/python/App/ApplicationManager.py
View file @
0719961b
...
...
@@ -33,6 +33,7 @@ from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from
cgi
import
escape
import
zLOG
import
Lifetime
from
AccessControl.requestmethod
import
postonly
try
:
import
thread
except
:
get_ident
=
lambda
:
0
...
...
@@ -400,8 +401,9 @@ class ApplicationManager(Folder,CacheManager):
</head>
<body>Zope is restarting</body></html>
"""
%
escape
(
URL1
,
1
)
manage_restart
=
postonly
(
manage_restart
)
def
manage_shutdown
(
self
):
def
manage_shutdown
(
self
,
REQUEST
=
None
):
"""Shut down the application"""
try
:
user
=
'"%s"'
%
getSecurityManager
().
getUser
().
getUserName
()
...
...
@@ -416,6 +418,7 @@ class ApplicationManager(Folder,CacheManager):
</head>
<body>Zope is shutting down</body></html>
"""
manage_shutdown
=
postonly
(
manage_shutdown
)
def
manage_pack
(
self
,
days
=
0
,
REQUEST
=
None
):
"""Pack the database"""
...
...
@@ -428,6 +431,7 @@ class ApplicationManager(Folder,CacheManager):
REQUEST
[
'RESPONSE'
].
redirect
(
REQUEST
[
'URL1'
]
+
'/manage_workspace'
)
return
t
manage_pack
=
postonly
(
manage_pack
)
def
revert_points
(
self
):
return
()
...
...
@@ -478,6 +482,7 @@ class ApplicationManager(Folder,CacheManager):
db
.
commitVersion
(
v
)
if
REQUEST
is
not
None
:
REQUEST
[
'RESPONSE'
].
redirect
(
REQUEST
[
'URL1'
]
+
'/manage_main'
)
manage_saveVersions
=
postonly
(
manage_saveVersions
)
def
manage_discardVersions
(
self
,
versions
,
REQUEST
=
None
):
"Discard some versions"
...
...
@@ -486,6 +491,7 @@ class ApplicationManager(Folder,CacheManager):
db
.
abortVersion
(
v
)
if
REQUEST
is
not
None
:
REQUEST
[
'RESPONSE'
].
redirect
(
REQUEST
[
'URL1'
]
+
'/manage_main'
)
manage_discardVersions
=
postonly
(
manage_discardVersions
)
def
getSOFTWARE_HOME
(
self
):
return
getConfiguration
().
softwarehome
...
...
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