summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2018-05-02 17:44:42 +0200
committerBenoit Foucher <benoit@zeroc.com>2018-05-02 17:44:42 +0200
commit50162a43f6a218f68c3ffd7024ddb53b247c6749 (patch)
treeaff1afafd734a28bb2263e0f1a767226783692a4 /cpp/src
parentFixed SChannel IceSSL implementation bug which could cause an assert to occur... (diff)
downloadice-50162a43f6a218f68c3ffd7024ddb53b247c6749.tar.bz2
ice-50162a43f6a218f68c3ffd7024ddb53b247c6749.tar.xz
ice-50162a43f6a218f68c3ffd7024ddb53b247c6749.zip
Clear Glacier2 reserved contexts, fixes #30
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Glacier2/SessionRouterI.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpp/src/Glacier2/SessionRouterI.cpp b/cpp/src/Glacier2/SessionRouterI.cpp
index a8c26a8ac23..958bbc5e649 100644
--- a/cpp/src/Glacier2/SessionRouterI.cpp
+++ b/cpp/src/Glacier2/SessionRouterI.cpp
@@ -453,6 +453,15 @@ CreateSession::CreateSession(const SessionRouterIPtr& sessionRouter, const strin
_user(user),
_current(current)
{
+ // Clear reserved contexts potentially set by client
+ _context.erase("_con.type");
+ _context.erase("_con.remotePort");
+ _context.erase("_con.remoteAddress");
+ _context.erase("_con.localPort");
+ _context.erase("_con.localAddress");
+ _context.erase("_con.cipher");
+ _context.erase("_con.peerCert");
+
if(_instance->properties()->getPropertyAsInt("Glacier2.AddConnectionContext") > 0)
{
_context["_con.type"] = current.con->type();