cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
781
Views
0
Helpful
1
Replies

invalid regex validation of devicename in addPhone

stephan.steiner
Spotlight
Spotlight

Of course the last one wasn't really the last one, so here we go again.

Create a device with a devicename 'CSF_Template'. ccmadmin tells you:

Device Name should contain the valid characters. Valid characters are [a-zA-Z0-9]{1,15}


Do the same in AXL, and the error is


The specified name has invalid characters or is not formatted correctly for this device type.Valid characters include [a-zA-Z0-9._-]{1,50}


Not the same regex, right?


Logs are as follows


2017-10-26 16:12:47,734 DEBUG [http-bio-443-exec-225] filters.TimingFilter - Received request 1505911707312 from sdkuser at IP 10.80.0.168

2017-10-26 16:12:47,734 DEBUG [http-bio-443-exec-225] wrappers.RequestHeaderWrapper - Inside Request Header Wrapper

2017-10-26 16:12:47,735 DEBUG [http-bio-443-exec-225] filters.AuthenticationFilter - Operation:add api:addPhone

2017-10-26 16:12:47,736 DEBUG [http-bio-443-exec-225] filters.ThrottlingFilter - DBLCNQueue Count: 0

2017-10-26 16:12:47,736 DEBUG [http-bio-443-exec-225] filters.ThrottlingFilter - Successfully set the value of counter: 4 value: 0

2017-10-26 16:12:47,737 DEBUG [http-bio-443-exec-225] servletRouters.AXLAlpha - Checking request version [11.5]

2017-10-26 16:12:47,737 DEBUG [http-bio-443-exec-225] servletRouters.AXLAlpha - Checking if requested api [addPhone] the implementedHandlers list

2017-10-26 16:12:47,737 DEBUG [http-bio-443-exec-225] servletRouters.AXLAlpha - [addPhone] is not in the implementedHandlers list

2017-10-26 16:12:47,737 DEBUG [http-bio-443-exec-225] servletRouters.AXLAlpha - Checking if version is 8.x

2017-10-26 16:12:47,737 DEBUG [http-bio-443-exec-225] servletRouters.AXLAlpha - function to check if the version is 8.x

2017-10-26 16:12:47,738 DEBUG [http-bio-443-exec-225] servletRouters.AXLAlpha - version is not 8.x

2017-10-26 16:12:47,738 INFO  [http-bio-443-exec-225] servletRouters.AXLAlpha - Executing api: addPhone in axis

2017-10-26 16:12:47,738 DEBUG [http-bio-443-exec-225] wrappers.RequestNamespaceWrapper - Inside Request Wrapper

2017-10-26 16:12:47,748 DEBUG [http-bio-443-exec-225] servletRouters.AXLAlpha - AXL REQUEST :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5"><soapenv:Header/><soapenv:Body><ns:addPhone sequence="0"> <phone><name>CSF_Template</name><description>template</description><product>Cisco Unified Client Services Framework</product><class>Phone</class><protocol>SIP</protocol><protocolSide>User</protocolSide><userHoldMohAudioSourceId>1</userHoldMohAudioSourceId><vendorConfig><desktopClient>  <ciscoSupportField>configurationfile=jabber_standard.xml</ciscoSupportField></desktopClient></vendorConfig><traceFlag>false</traceFlag><preemption>Disabled</preemption><mlppIndicationStatus>Off</mlppIndicationStatus><preemption>Disabled</preemption><lines/><phoneTemplateName uuid="{8E1A10FA-A52C-4435-A4EC-540D266C8C37}">Standard Client Services Framework</phoneTemplateName><userLocale>English United States</userLocale><singleButtonBarge>Off</singleButtonBarge><joinAcrossLines>Off</joinAcrossLines><callInfoPrivacyStatus>Default</callInfoPrivacyStatus><ignorePresentationIndicators>false</ignorePresentationIndicators><dndOption>Ringer Off</dndOption><dndStatus>false</dndStatus><alwaysUsePrimeLine>Default</alwaysUsePrimeLine><alwaysUsePrimeLineForVoiceMessage>Default</alwaysUsePrimeLineForVoiceMessage><callingSearchSpaceName uuid="{9223FBD6-B942-5E41-ED4C-AD7E056C844D}">css_international</callingSearchSpaceName><devicePoolName>Default</devicePoolName><commonPhoneConfigName uuid="{AC243D17-98B4-4118-8FEB-5FF2E1B781AC}">Standard Common Phone Profile</commonPhoneConfigName><networkLocation>Use System Default</networkLocation><locationName>Hub_None</locationName><networkHoldMohAudioSourceId>51</networkHoldMohAudioSourceId><useTrustedRelayPoint>Default</useTrustedRelayPoint><retryVideoCallAsAudio>true</retryVideoCallAsAudio><securityProfileName uuid="{C6085E14-A32C-4C5E-A3D1-8DAF60D81594}">Cisco Unified Client Services Framework - Standard SIP Non-Secure Profile</securityProfileName><sipProfileName uuid="{FCBC7581-4D8D-48F3-917E-00B09FB39213}">Standard SIP Profile</sipProfileName><useDevicePoolCgpnTransformationCss>true</useDevicePoolCgpnTransformationCss><sendGeoLocation>false</sendGeoLocation><ringSettingIdleBlfAudibleAlert>Default</ringSettingIdleBlfAudibleAlert><ringSettingBusyBlfAudibleAlert>Default</ringSettingBusyBlfAudibleAlert><enableExtensionMobility>false</enableExtensionMobility><builtInBridgeStatus>Default</builtInBridgeStatus><hlogStatus>Off</hlogStatus><packetCaptureMode>None</packetCaptureMode><packetCaptureDuration>0</packetCaptureDuration><hotlineDevice>false</hotlineDevice><subscribeCallingSearchSpaceName uuid="{9223FBD6-B942-5E41-ED4C-AD7E056C844D}">css_international</subscribeCallingSearchSpaceName><allowCtiControlFlag>true</allowCtiControlFlag><presenceGroupName uuid="{AD243D17-98B4-4118-8FEB-5FF2E1B781AC}">Standard Presence group</presenceGroupName><unattendedPort>false</unattendedPort><requireDtmfReception>false</requireDtmfReception><rfc2833Disabled>false</rfc2833Disabled><certificateOperation>No Pending Operation</certificateOperation><deviceMobilityMode>Default</deviceMobilityMode><remoteDevice>false</remoteDevice><isActive>true</isActive><isDualMode>false</isDualMode><phoneSuite>Default</phoneSuite><phoneServiceDisplay>Default</phoneServiceDisplay><isProtected>false</isProtected><mtpRequired>false</mtpRequired><mtpPreferedCodec>711ulaw</mtpPreferedCodec><outboundCallRollover>No Rollover</outboundCallRollover><deviceTrustMode>Not Trusted</deviceTrustMode><requireOffPremiseLocation>false</requireOffPremiseLocation><useDevicePoolCgpnIngressDN>true</useDevicePoolCgpnIngressDN><enableCallRoutingToRdWhenNoneIsActive>false</enableCallRoutingToRdWhenNoneIsActive></phone></ns:addPhone></soapenv:Body></soapenv:Envelope>

2017-10-26 16:12:47,748 DEBUG [http-bio-443-exec-225] servletRouters.AXLAlpha - Request processed by AXIS

2017-10-26 16:12:47,750 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - dbConnector Initialization in handler.java

2017-10-26 16:12:47,751 DEBUG [http-bio-443-exec-225] axlapiservice.Axl - Connection given to current thread

2017-10-26 16:12:47,751 DEBUG [http-bio-443-exec-225] axlapiservice.AXLCallFlow - In begin transaction of AXLCallflow and created pub connector

2017-10-26 16:12:47,752 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,752 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,753 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,754 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,754 DEBUG [http-bio-443-exec-225] axlapiservice.AddPhoneHandler - select tkModel from TypeProduct where typeproduct.enum='390'

2017-10-26 16:12:47,755 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - select tksupportsfeature, tkdeviceprotocol,param from ProductSupportsFeature where tkproduct='390'  and tkdeviceprotocol in ('11',99)

2017-10-26 16:12:47,756 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 supports feature 116

2017-10-26 16:12:47,756 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - getPkid Query is :select pkid from CallingSearchSpace where my_lower(name ) =my_lower('css_international' )

2017-10-26 16:12:47,758 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - getPkid Query is :select pkid from DevicePool where my_lower(name ) =my_lower('Default' )

2017-10-26 16:12:47,759 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 supports feature 104

2017-10-26 16:12:47,759 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,759 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - getPkid Query is :select pkid from CommonPhoneConfig where my_lower(name ) =my_lower('Standard Common Phone Profile' )

2017-10-26 16:12:47,761 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,761 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - getPkid Query is :select pkid from Location where my_lower(name ) =my_lower('Hub_None' )

2017-10-26 16:12:47,762 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,763 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,764 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,765 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - getPkid Query is :select pkid from SecurityProfile where my_lower(name ) =my_lower('Cisco Unified Client Services Framework - Standard SIP Non-Secure Profile' )

2017-10-26 16:12:47,766 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - getPkid Query is :select pkid from PhoneTemplate where my_lower(name ) =my_lower('Standard Client Services Framework' )

2017-10-26 16:12:47,767 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - getPkid Query is :select pkid from PhoneTemplate where my_lower(name ) =my_lower('Standard Client Services Framework' )

2017-10-26 16:12:47,768 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - select enum from TypeUserLocale where name='English United States'

2017-10-26 16:12:47,768 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 does not support feature 18

2017-10-26 16:12:47,769 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 does not support feature 79

2017-10-26 16:12:47,769 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 does not support feature 78

2017-10-26 16:12:47,769 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 does not support feature 53

2017-10-26 16:12:47,769 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,770 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,771 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,772 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,773 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - getPkid Query is :select pkid from CallingSearchspace where my_lower(name ) =my_lower('css_international' )

2017-10-26 16:12:47,774 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - getPkid Query is :select pkid from Matrix where my_lower(name ) =my_lower('Standard Presence group' )

2017-10-26 16:12:47,775 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 does not support feature 120

2017-10-26 16:12:47,775 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 does not support feature 114

2017-10-26 16:12:47,775 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 does not support feature 114

2017-10-26 16:12:47,776 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,776 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,777 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 does not support feature 76

2017-10-26 16:12:47,777 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 does not support feature 76

2017-10-26 16:12:47,777 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 supports feature 72

2017-10-26 16:12:47,778 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 does not support feature 76

2017-10-26 16:12:47,778 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,778 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,779 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,779 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,780 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 does not support feature 63

2017-10-26 16:12:47,780 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,781 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,781 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Inside addTkdataAXIS utils part

2017-10-26 16:12:47,782 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - Product 390 does not support feature 144

2017-10-26 16:12:47,782 DEBUG [http-bio-443-exec-225] axlapiservice.Handler - insert into Device ( tkDeviceProtocol,tkPacketCaptureMode,fkMatrix_Presence,tkNetworkLocation,tkStatus_MLPPIndicationStatus,tkProtocolSide,tkStatus_DeviceMobilityMode,DeviceLevelTraceFlag,fkPhoneTemplate,NetworkHoldMOHAudioSourceID,RFC2833Disabled,fkCallingSearchSpace,tkdevicetrustmode,tkStatus_AlwaysUsePrimeLineForVM,tkStatus_BuiltInBridge,enableCallRoutingToRdWhenNoneIsActive,tkOutboundCallRollover,requireCERLocation,isprotected,remoteDevice,unattended_port,PacketCaptureDuration,AllowHotelingFlag,tkCertificateOperation,fkLocation,AllowCTIControlFlag,fkCommonPhoneConfig,pkid,tkStatus_UseTrustedRelayPoint,tkProduct,mTPRequired,fkCallingSearchspace_restrict,requireDTMFReception,fkDevicePool,tkPhonePersonalization,tkSIPCodec_MTPPreferredOrigCodec,tkStatus_AlwaysUsePrimeLine,fkSIPProfile,UseDevicePoolCgpnIngressDN,tkPreemption,SendGeoLocation,hotlinedevice,Description,tkstatus_joinacrosslines,ignorePI,Name,retryVideoCallAsAudio,tkUserLocale,tkDndOption,tkClass,tkPhoneServiceDisplay,UserHoldMOHAudioSourceID,fkSecurityProfile ) values ( '11','0','ad243d17-98b4-4118-8feb-5ff2e1b781ac','2','0','1','2','f','8e1a10fa-a52c-4435-a4ec-540d266c8c37','51','f','9223fbd6-b942-5e41-ed4c-ad7e056c844d','0','2','2','f','0','f','f','f','f','0','f','1','29c5c1c4-8871-4d1e-8394-0b9181e8c54d','t','ac243d17-98b4-4118-8feb-5ff2e1b781ac','242061e7-b52c-d0cc-29af-25c16f035bc9','2','390','f','9223fbd6-b942-5e41-ed4c-ad7e056c844d','f','1b1b9eb6-7803-11d3-bdf0-00108302ead1','3','1','2','fcbc7581-4d8d-48f3-917e-00b09fb39213','t','0','f','f','template','0','f','CSF_Template','t','1','0','1','3','1','c6085e14-a32c-4c5e-a3d1-8daf60d81594' )

2017-10-26 16:12:47,967 ERROR [http-bio-443-exec-225] axlapiservice.AXLAPIServiceSkeleton - SQL EXCEPTION has occurred, will be sending you the exact error Info

2017-10-26 16:12:47,968 DEBUG [http-bio-443-exec-225] axlapiservice.AXLCallFlow - In rollback transaction and created pub connector

2017-10-26 16:12:47,968 DEBUG [http-bio-443-exec-225] axlapiservice.Axl - Connection closed and hashmap entry removed in AXL.java closing connection

2017-10-26 16:12:47,969 DEBUG [http-bio-443-exec-225] axlapiservice.AXLCallFlow - Rollback transaction connector object closed

2017-10-26 16:12:47,969 DEBUG [http-bio-443-exec-225] axlapiservice.AXLCallFlow - In AXL CAll Flow class, method getSOAPError

2017-10-26 16:12:47,969 DEBUG [http-bio-443-exec-225] axlapiservice.AXLCallFlow - checking typeDBErrors for sql exception name

2017-10-26 16:12:47,970 DEBUG [http-bio-443-exec-225] axlapiservice.AXLCallFlow - Setting soap fault

2017-10-26 16:12:47,970 DEBUG [http-bio-443-exec-225] axlapiservice.AXLCallFlow - Setting soap fault2

2017-10-26 16:12:47,975 DEBUG [http-bio-443-exec-225] servletRouters.AXLAlpha - <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>The specified name has invalid characters or is not formatted correctly for this device type.Valid characters include [a-zA-Z0-9._-]{1,50}</faultstring><detail><axlError><axlcode>491</axlcode><axlmessage>The specified name has invalid characters or is not formatted correctly for this device type.Valid characters include [a-zA-Z0-9._-]{1,50}</axlmessage><request>addPhone</request></axlError></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

2017-10-26 16:12:47,975 DEBUG [http-bio-443-exec-225] servletRouters.AXLAlpha - Finished processing request

2017-10-26 16:12:47,975 INFO  [http-bio-443-exec-225] filters.TimingFilter - Request 1505911707312 received from sdkuser at ip 10.80.0.168 was processed in 241ms

1 Reply 1

stephan.steiner
Spotlight
Spotlight

It seems I'm not the only one having this issue, I just found this: https://devnetsupport.cisco.com/hc/en-us/articles/115011144247?input_string=invalid+regex+validation+of+name+field+in+ad…

could the defect please be made public?

Thanks