|
@@ -421,6 +421,7 @@ processMSG(UA_Server *server, UA_SecureChannel *channel,
|
|
/* Set an anonymous, inactive session for services that need no session */
|
|
/* Set an anonymous, inactive session for services that need no session */
|
|
UA_Session anonymousSession;
|
|
UA_Session anonymousSession;
|
|
if(!session) {
|
|
if(!session) {
|
|
|
|
+ #ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
|
if(sessionRequired) {
|
|
if(sessionRequired) {
|
|
UA_LOG_INFO_CHANNEL(server->config.logger, channel,
|
|
UA_LOG_INFO_CHANNEL(server->config.logger, channel,
|
|
"Service request %i without a valid session",
|
|
"Service request %i without a valid session",
|
|
@@ -429,12 +430,14 @@ processMSG(UA_Server *server, UA_SecureChannel *channel,
|
|
return sendServiceFault(channel, msg, requestPos, responseType,
|
|
return sendServiceFault(channel, msg, requestPos, responseType,
|
|
requestId, UA_STATUSCODE_BADSESSIONIDINVALID);
|
|
requestId, UA_STATUSCODE_BADSESSIONIDINVALID);
|
|
}
|
|
}
|
|
|
|
+ #endif
|
|
UA_Session_init(&anonymousSession);
|
|
UA_Session_init(&anonymousSession);
|
|
anonymousSession.sessionId = UA_NODEID_GUID(0, UA_GUID_NULL);
|
|
anonymousSession.sessionId = UA_NODEID_GUID(0, UA_GUID_NULL);
|
|
anonymousSession.channel = channel;
|
|
anonymousSession.channel = channel;
|
|
session = &anonymousSession;
|
|
session = &anonymousSession;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ #ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
|
/* Trying to use a non-activated session? */
|
|
/* Trying to use a non-activated session? */
|
|
if(sessionRequired && !session->activated) {
|
|
if(sessionRequired && !session->activated) {
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
UA_LOG_INFO_SESSION(server->config.logger, session,
|
|
@@ -446,6 +449,7 @@ processMSG(UA_Server *server, UA_SecureChannel *channel,
|
|
return sendServiceFault(channel, msg, requestPos, responseType,
|
|
return sendServiceFault(channel, msg, requestPos, responseType,
|
|
requestId, UA_STATUSCODE_BADSESSIONNOTACTIVATED);
|
|
requestId, UA_STATUSCODE_BADSESSIONNOTACTIVATED);
|
|
}
|
|
}
|
|
|
|
+ #endif
|
|
|
|
|
|
/* The session is bound to another channel */
|
|
/* The session is bound to another channel */
|
|
if(session->channel != channel) {
|
|
if(session->channel != channel) {
|