You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find-PVFile function should provide the list of files and deatails about each file in the safe.
Current Behaviour
This function stops returning correct file details after one of the files contains attribute with multi-line content.
For example, if FileCategories attribute contains CPMErrorDetails value wich spans on multiple lines.
Possible Solution
Before sending output to ConvertFrom-PacliOutput normalize it to avoid new lines and also # characters in the CPM error.
Here is example code:
Also it could be good to check the $Results.length to make sure that it can be divided by 32 without leftovers. If you get floating number, by division on 32, then your properties are shifted.
Steps to Reproduce (for bug reports)
1 . Create some attribute on account which accepts multiline input and set it.
2 . Add several accounts in the safe. All of them may contain this multiline attribute set or only some accoutns may have this attribute set.
3 . Try to use Find-PVFile function to query all accounts in the safe.
Here is example output, before it being processed by ConvertFrom-PacliOutput function, you can use it to reproduce the issue. Here I have 2 accounts in the safe:
"MyPlatformName1-MyAddress1-CYBERARK_TESTING","","Thu May 27 12:41:20 2021","CPMv20","--","","Thu May 27 12:41:20 2021","CPMv20","--","","","500","NO","000000000000052","MySafeName1","Root","5","-1","PENDING","Fri May 07 09:08:48 2021","user.name","Mon May 17 15:54:51 2021","usr1","Mon May 17 15:54:51 2021","usr1","Thu May 27 12:41:20 2021","CPMv20","Thu May 27 12:41:20 2021","CPMv20","--","","UserName:CYBERARK_TESTING#PolicyID:MyTestPlatform#DeviceType:Imported Platforms#Address:MyAddress#CreationMethod:PVWA#ServiceName:MySvcName1#CPMErrorDetails:Execution error. EXT01::Did not find any matching prompt for 'Traceback (most recent call last):File "C:\ProgramFiles(x86)\CyberArk\PasswordManager\bin\MyScript.py", line 18, in <module>
temp.click()File"C:\Program Files (x86)\Python39-32\lib\site-packages\selenium\webdriver\remote\webelement.py",line80,inclickself._execute(Command.CLICK_ELEMENT)File"C:\Program Files (x86)\Python39-32\lib\site-packages\selenium\webdriver\remote\webelement.py",line633,in_executereturnself._parent.execute(command,params)File"C:\Program Files (x86)\Python39-32\lib\site-packages\selenium\webdriver\remote\webdriver.py",line321,inexecuteself.error_handler.check_response(response)File"C:\Program Files (x86)\Python39-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py",line242,incheck_responseraiseexception_class(message,screen,stacktrace)selenium.common.exceptions.ElementNotVisibleException: Message: elementnotvisible(Sessioninfo: chrome=90.0.4430.93)(Driverinfo: chromedriver=2.35.528161(5b82f2d2aae0ca24b877009200ced9065a772e73),platform=WindowsNT6.3.9600x86_64)
'. Error code:-1#ResetImmediately:ChangeTask#RetriesCount:1#CPMStatus:failure#LastTask:ChangeTask#LastFailDate:1622112081#CPMDisabled:(CPM)MaxRetries#"
"ztest1","","Wed Jun 23 14:51:03 2021","username2","--","","Wed Jun 23 14:51:03 2021","username2","--","","","500","NO","000000000000053","MySafeName1","Root","6","-1","PENDING","Wed Jun 23 14:51:03 2021","username2","Wed Jun 23 14:51:03 2021","username2","--","","--","","--","","--","","ServiceName:xtestsvc#DeviceType:Imported Platforms#UserName:xtestusr1#PolicyID:MyTestPlatform#Address:xtestaddr1#CreationMethod:PVWA#"
4 . Check the output and notice that after account with multi-line attribute all properties of other accounts would not be displayed correctly, because in the function below you expect that each property is located in a separate line, but in our case lines are shifted down because of multi-line property value:
Also I think it could be possible to normalize it in that way that later you can use ConvertFrom-Csv function, which also supports multi-line attributes and can grab it correctly natively and afterwards you will have parameter contain also multi-line string, instead of single line normalized line, as I did above.
I belive that it is enough to replace double quotes " with single ' qote in the CPM Error message
Headers are just for example below, h1, h2, etc.. could be replaced by "Filename", "Accessed", etc..
Your issue may already be reported. Please search existing
issues
before creating one.Your Environment
Name Value
PSVersion 5.1.17763.1852
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.1852
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
ModuleVersion = '2.1.27'
File version: 11.1.0.59
Product version: 11.01.0
11.1
Expected Behaviour
Find-PVFile function should provide the list of files and deatails about each file in the safe.
Current Behaviour
This function stops returning correct file details after one of the files contains attribute with multi-line content.
For example, if FileCategories attribute contains CPMErrorDetails value wich spans on multiple lines.
Possible Solution
Before sending output to ConvertFrom-PacliOutput normalize it to avoid new lines and also # characters in the CPM error.
Here is example code:
Also it could be good to check the $Results.length to make sure that it can be divided by 32 without leftovers. If you get floating number, by division on 32, then your properties are shifted.
Steps to Reproduce (for bug reports)
1 . Create some attribute on account which accepts multiline input and set it.
2 . Add several accounts in the safe. All of them may contain this multiline attribute set or only some accoutns may have this attribute set.
3 . Try to use Find-PVFile function to query all accounts in the safe.
Here is example output, before it being processed by ConvertFrom-PacliOutput function, you can use it to reproduce the issue. Here I have 2 accounts in the safe:
4 . Check the output and notice that after account with multi-line attribute all properties of other accounts would not be displayed correctly, because in the function below you expect that each property is located in a separate line, but in our case lines are shifted down because of multi-line property value:
Sample Output
Context
I'm getting the list of all accounts in safe with all their attributes, including filecategories and export it as a table.
The text was updated successfully, but these errors were encountered: