Commit b11d85c1 authored by chiaming2000's avatar chiaming2000
Browse files

Enforce message validation rule for set Security command. The simulator

set StatusCode to INVALID_REQUEST in the response message if the set
Security request message contains more than one of ACL/ICE/LOCK
information in the message.
parent 648d5063
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -102,16 +102,16 @@ public abstract class SecurityHandler {
        // check if only contains one security component change (ACL or ICE or Lock Pin)
        if (isSecurityMessageValid(request) == false) {
            
            logger.warning("security not enforced at this time, should not set ACL/ICE/LOCL at the same time ...");
          
//            commandBuilder.getStatusBuilder().setCode(
//                    StatusCode.INVALID_REQUEST);
//            commandBuilder
//                    .getStatusBuilder()
//                    .setStatusMessage(
//                            "contains more than one security component change (ACL or ICE or Lock Pin");
//            
//            return;
            //logger.warning("security not enforced at this time, should not set ACL/ICE/LOCL at the same time ...");
          
            commandBuilder.getStatusBuilder().setCode(
                    StatusCode.INVALID_REQUEST);
            commandBuilder
                    .getStatusBuilder()
                    .setStatusMessage(
                            "contains more than one security component change (ACL or ICE or Lock Pin");
            
            return;
        }

        // get ACL list