|
@@ -61,10 +61,15 @@ void Service_ActivateSession(UA_Server *server, UA_SecureChannel *channel,
|
|
|
|
|
|
UA_String ap = UA_STRING(ANONYMOUS_POLICY);
|
|
|
UA_String up = UA_STRING(USERNAME_POLICY);
|
|
|
- if(token.policyId.data == UA_NULL) {
|
|
|
-
|
|
|
- response->responseHeader.serviceResult = UA_STATUSCODE_BADIDENTITYTOKENINVALID;
|
|
|
- } else if(server->config.Login_enableAnonymous && UA_String_equal(&token.policyId, &ap)) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if(server->config.Login_enableAnonymous && (token.policyId.data == UA_NULL || UA_String_equal(&token.policyId, &ap))) {
|
|
|
|
|
|
if(foundSession->channel && foundSession->channel != channel)
|
|
|
UA_SecureChannel_detachSession(foundSession->channel, foundSession);
|