V10 RestAPI add account call returns error on Chinese characters

V10 RestAPI add account call returns error on Chinese characters

107
Created On 11/10/26 10:56 AM - Last Modified 11/10/26 13:02 PM


Symptom


When customer used Chinese characters in  Restapi body call body, http 400 error code was  returned.  Please refer to below screenshot.

The issue affects v10 RestAPI only and it works on v9 RestAPI. Customer could add Chinese character in PVWA as well.
Example: 
{ 
"address": "1.6", 
"userName": "test", 
"platformId": "UnixSSH", 
"safeName": "Test", 
"secret": "pass1234", 
"platformAccountProperties":{"Remark":"内容"} 
}


In PVWA log
[06/11/2019 | 17:11:28.903432] | {pid= 7692} | {tid=     8912} |  ::  | PASWS001I Starting method Accounts::AddAccount
[06/11/2019 | 17:11:28.928817] | {pid= 7692} | {tid=     8912} |  ::  | EPVWA086E The string [Mysql数据库根用户] contains problematic charcters. Reason: 无法将位于索引 5 处的 Unicode 字符 \u6570 转换为指定的代码页。
[06/11/2019 | 17:11:28.928950] | {pid= 7692} | {tid=     8912} |  ::  | PASWS019E Input parameter for [Remarks] value has invalid characters.
[06/11/2019 | 17:11:28.929170] | {pid= 7692} | {tid=     8912} |  ::  | PASWS002I Ending method Accounts::AddAccount
[06/11/2019 | 17:11:28.929306] | {pid= 7692} | {tid=     8912} |  ::  | PASWS001I Starting method GeneralExceptionAttribute::OnException
[06/11/2019 | 17:11:28.929416] | {pid= 7692} | {tid=     8912} |  ::  | PASWS001E Error occurred: PASWS019E Input parameter for [Remarks] value has invalid characters.

 


Environment


10.5;10.6 Component: Password Vault Web Access Functional Area: Add Accounts

Cause


As per R&D,  double-bytes characters are not supported in DB,  even in a custom File Category as they could cause some issues with the Vault or PVWA functions.

Therefore , a new validation method was added with the RESTApi and v10 interface. In V9 interface it is not blocked as it no longer gets updates and thus no validation. 


Resolution


Avoid including double-bytes characters in RESTAPI call.

 


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj00000015wxCAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail