Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
SDK 9.7P1 cifs-session-file-get-iter crashing on special charctor \005 "ENQ"
2020-07-17
10:50 AM
1,429 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have run into an issue with cifs-session-file-get-iter crashing. We have a cifs share that is appending "^EQ30lsldxJoudresxAaaqpcawXc" to the end of the file name. A search for Q30lsldxJoudresxAaaqpcawXc explains that it is a windows feature "Created by Indexing service on images" or "Alternate Data Streaming" not sure which applies or if they are saying the same thing.
The result is a crash of the command:
Traceback (most recent call last):
Traceback (most recent call last):
File "./cifs_sessions_get_iter.py", line 47, in <module>
xo = s.invoke_elem(api)
File "/data/netapp/netapp-manageability-sdk-9.7P1/lib/python/NetApp/NaServer.py", line 518, in invoke_elem
return self.parse_xml(xml_response)
File "/data/netapp/netapp-manageability-sdk-9.7P1/lib/python/NetApp/NaServer.py", line 715, in parse_xml
p.Parse(xmlresponse, 1)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 4, column 377
Using python 2.7 and 3.6
I was able to work around this by adding a line of code at line 504 to remove the special charter. I am figuring if one broke it the rest might also so I am pruning the special charters before the xml parser in NaServer.py:
xml_response = re.sub('[\000-\031]','',xml_response)
Is there another way to doing this without modifying NaServer.py?
If not can I have your recommendations?
Maybe a fix can be put in to process special charters?
Thank you
0 REPLIES 0
