Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix remote code execution vulnerability #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libopencore/http_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def __call__(self, environ, start_response):
_cookie_domain_re = re.compile(r'(domain="?)([a-z0-9._-]*)("?)', re.I)
from lxml.html import document_fromstring, tostring
import urlparse
from Cookie import Cookie
from Cookie import SimpleCookie

def rewrite_links(request, response,
proxied_base, orig_base,
Expand Down Expand Up @@ -215,7 +215,7 @@ def rewrite_domain(match):
return match.group(0)
cook = _cookie_domain_re.sub(rewrite_domain, cook)

_cook = Cookie(cook)
_cook = SimpleCookie(cook)
assert len(_cook.keys()) == 1
for key in _cook.keys():
_morsel = _cook[key]
Expand Down