Ticket #1194: deluge.diff

File deluge.diff, 1.1 KB (added by Motiejus, 14 years ago)

auth.py cookie base path vs deluge-web 1.3.1

  • .py

    diff --git a/auth.orig.py b/auth.py
    index 101bc62..699133c 100644
    old new class Auth(JSONComponent):  
    135135        expires, expires_str = make_expires(config["session_timeout"])
    136136        checksum = str(make_checksum(session_id))
    137137       
     138        base = str(component.get("Web").get_config()["base"])
    138139        request.addCookie('_session_id', session_id + checksum,
    139                 path="/json", expires=expires_str)
     140                path=base+"json", expires=expires_str)
    140141       
    141142        log.debug("Creating session for %s", login)
    142143        config = component.get("DelugeWeb").config
    class Auth(JSONComponent):  
    232233            session["expires"] = expires
    233234
    234235            _session_id = request.getCookie("_session_id")
     236            base = str(component.get("Web").get_config()["base"])
    235237            request.addCookie('_session_id', _session_id,
    236                     path="/json", expires=expires_str)
     238                    path=base+"json", expires=expires_str)
    237239       
    238240        if method:
    239241            if not hasattr(method, "_json_export"):