-
Notifications
You must be signed in to change notification settings - Fork 91
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
Mitigate Billion Laughs vulnerability #1038
Conversation
This PR should fix the redhat-developer/vscode-xml#476 issue but I need
|
...ipse/lemminx/extensions/contentmodel/participants/diagnostics/LSPXMLParserConfiguration.java
Outdated
Show resolved
Hide resolved
08916bb
to
23c1446
Compare
My issue was with Eclipse IDE. Now it works I select the entity which causes the problem. |
...se.lemminx/src/test/java/org/eclipse/lemminx/extensions/contentmodel/DTDDiagnosticsTest.java
Outdated
Show resolved
Hide resolved
You can still freeze the language server if you do the following:
|
23c1446
to
2164736
Compare
I'm seeing similar behaviour. The patch works when resolving entities is enabled. When one disables it, the CPU still goes to 100% for the process. Suspending the thread that seems to be spinning generally yields :
I was also able to reproduce this a few times without this patch, even when I could clearly see that entity resolution was being passed in as false. |
2164736
to
0fc4ff2
Compare
Fixes redhat-developer/vscode-xml#476 Signed-off-by: azerr <[email protected]>
Good catch! It should work now. @datho7561 could you tell me if it is working with your usecase plase. |
@@ -20,6 +20,7 @@ | |||
import org.apache.xerces.xni.XMLLocator; | |||
import org.eclipse.lemminx.commons.BadLocationException; | |||
import org.eclipse.lemminx.dom.DOMDocument; | |||
import org.eclipse.lemminx.dom.DOMDocumentType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is not used
Billion Laughs attack vulnerability
Fixes redhat-developer/vscode-xml#476
Signed-off-by: azerr [email protected]