Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Kirill Smelkov
ZODB
Commits
d6f3c3ce
Commit
d6f3c3ce
authored
Aug 06, 2009
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed vulnerabilities in the ZEO network protocol
affecting ZEO storage servers.
parent
e5535df3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
6 deletions
+44
-6
NEWS.txt
NEWS.txt
+7
-1
setup.py
setup.py
+1
-1
src/ZEO/StorageServer.py
src/ZEO/StorageServer.py
+2
-1
src/ZEO/auth/auth_digest.py
src/ZEO/auth/auth_digest.py
+1
-1
src/ZEO/tests/auth_plaintext.py
src/ZEO/tests/auth_plaintext.py
+1
-1
src/ZEO/zrpc/connection.py
src/ZEO/zrpc/connection.py
+2
-1
src/ZEO/zrpc/marshal.py
src/ZEO/zrpc/marshal.py
+30
-0
No files found.
NEWS.txt
View file @
d6f3c3ce
What's new on ZODB 3.7.4?
=========================
Release date: DD-MMM-YYYY
Release date: 06-Aug-2009
ZEO
---
- Fixed vulnerabilities in the ZEO network protocol
affecting ZEO storage servers.
What's new on ZODB 3.7.3?
...
...
setup.py
View file @
d6f3c3ce
...
...
@@ -20,7 +20,7 @@ to application logic. ZODB includes features such as a plugable storage
interface, rich transaction support, and undo.
"""
VERSION
=
"3.7.4
dev
"
VERSION
=
"3.7.4"
# The (non-obvious!) choices for the Trove Development Status line:
# Development Status :: 5 - Production/Stable
...
...
src/ZEO/StorageServer.py
View file @
d6f3c3ce
...
...
@@ -98,7 +98,7 @@ class ZEOStorage:
for
func
in
self
.
extensions
:
self
.
_extensions
[
func
.
func_name
]
=
None
def
finish_auth
(
self
,
authenticated
):
def
_
finish_auth
(
self
,
authenticated
):
if
not
self
.
auth_realm
:
return
1
self
.
authenticated
=
authenticated
...
...
@@ -356,6 +356,7 @@ class ZEOStorage:
def
new_oids
(
self
,
n
=
100
):
"""Return a sequence of n new oids, where n defaults to 100"""
n
=
min
(
n
,
100
)
if
self
.
read_only
:
raise
ReadOnlyError
()
if
n
<=
0
:
...
...
src/ZEO/auth/auth_digest.py
View file @
d6f3c3ce
...
...
@@ -121,7 +121,7 @@ class StorageClass(ZEOStorage):
check
=
hexdigest
(
"%s:%s"
%
(
h_up
,
challenge
))
if
check
==
response
:
self
.
connection
.
setSessionKey
(
session_key
(
h_up
,
self
.
_key_nonce
))
return
self
.
finish_auth
(
check
==
response
)
return
self
.
_
finish_auth
(
check
==
response
)
extensions
=
[
auth_get_challenge
,
auth_response
]
...
...
src/ZEO/tests/auth_plaintext.py
View file @
d6f3c3ce
...
...
@@ -41,7 +41,7 @@ class StorageClass(ZEOStorage):
self
.
connection
.
setSessionKey
(
session_key
(
username
,
self
.
database
.
realm
,
password
))
return
self
.
finish_auth
(
dbpw
==
password_dig
)
return
self
.
_
finish_auth
(
dbpw
==
password_dig
)
class
PlaintextClient
(
Client
):
extensions
=
[
"auth"
]
...
...
src/ZEO/zrpc/connection.py
View file @
d6f3c3ce
...
...
@@ -25,7 +25,7 @@ import traceback, time
import
ThreadedAsync
from
ZEO.zrpc
import
smac
from
ZEO.zrpc.error
import
ZRPCError
,
DisconnectedError
from
ZEO.zrpc.marshal
import
Marshaller
from
ZEO.zrpc.marshal
import
Marshaller
,
ServerMarshaller
from
ZEO.zrpc.trigger
import
trigger
from
ZEO.zrpc.log
import
short_repr
,
log
from
ZODB.loglevels
import
BLATHER
,
TRACE
...
...
@@ -838,6 +838,7 @@ class ManagedServerConnection(Connection):
def
__init__
(
self
,
sock
,
addr
,
obj
,
mgr
):
self
.
mgr
=
mgr
self
.
__super_init
(
sock
,
addr
,
obj
,
'S'
)
self
.
marshal
=
ServerMarshaller
()
self
.
obj
.
notifyConnected
(
self
)
def
handshake
(
self
):
...
...
src/ZEO/zrpc/marshal.py
View file @
d6f3c3ce
...
...
@@ -53,6 +53,20 @@ class Marshaller:
level
=
logging
.
ERROR
)
raise
class
ServerMarshaller
(
Marshaller
):
def
decode
(
self
,
msg
):
"""Decodes msg and returns its parts"""
unpickler
=
cPickle
.
Unpickler
(
StringIO
(
msg
))
unpickler
.
find_global
=
server_find_global
try
:
return
unpickler
.
load
()
# msgid, flags, name, args
except
:
log
(
"can't decode message: %s"
%
short_repr
(
msg
),
level
=
logging
.
ERROR
)
raise
_globals
=
globals
()
_silly
=
(
'__doc__'
,)
...
...
@@ -77,3 +91,19 @@ def find_global(module, name):
return
r
raise
ZRPCError
(
"Unsafe global: %s.%s"
%
(
module
,
name
))
def
server_find_global
(
module
,
name
):
"""Helper for message unpickler"""
try
:
if
module
!=
'ZopeUndo.Prefix'
:
raise
ImportError
m
=
__import__
(
module
,
_globals
,
_globals
,
_silly
)
except
ImportError
,
msg
:
raise
ZRPCError
(
"import error %s: %s"
%
(
module
,
msg
))
try
:
r
=
getattr
(
m
,
name
)
except
AttributeError
:
raise
ZRPCError
(
"module %s has no global %s"
%
(
module
,
name
))
return
r
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