Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XmlException: For security reasons DTD is prohibited in this XML document #540

Closed
nicolas-raoul opened this issue Mar 18, 2015 · 3 comments

Comments

@nicolas-raoul
Copy link
Contributor

This strange error happens with SharePoint 2013:

2015-03-17 16:32:35,668 [5] ERROR CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Could not crawl folder: /
DotCMIS.Exceptions.CmisConnectionException: Parsing exception! ---> System.Xml.XmlException: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
   at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlReader.MoveToContent()
   at System.Xml.XmlReader.IsStartElement()
   at DotCMIS.Binding.AtomPub.AtomPubParser.Parse()
   at DotCMIS.Binding.AtomPub.AbstractAtomPubService.Parse[T](Stream stream)
   --- End of inner exception stack trace ---
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.ProcessRecoverableException(String logMessage, Exception exception)
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.CrawlRemoteFolder(IFolder remoteSubFolder, String localFolder, IList`1 remoteFolders)
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.CrawlRemote(IFolder remoteFolder, String localFolder, IList`1 remoteFiles, IList`1 remoteFolders)
   at CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.CrawlSync(IFolder remoteFolder, String localFolder)
@nicolas-raoul
Copy link
Contributor Author

This QA hints to "set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method."

@nicolas-raoul
Copy link
Contributor Author

Customer confirms that this error is fixed by adding settings.DtdProcessing = DtdProcessing.Ignore; in atompub-parser.cs.

@nicolas-raoul
Copy link
Contributor Author

Fixed in CmisSync 2.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant