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
{{ message }}
Repository navigation
Can't find bundle for base name i18n.Validation, locale en_IN #3035
before we were using graphq-java:15.0 but this version showing one crital vulnerability and suggested to updrade 19.0 and later.
After updating 19.2. Our plugin api calls not working and throwing error
but we are not i18n super experts so perhaps there is a situation we are not aware of - for example some defaulting on a computer running in India for example?? Or some other overriding in place some how
but the ResourceBundle lookup is working as we would expected given the tests in that PR
But I have also tried with US timezone and same error give me
Can you please tell us more about how you "tried with US timezone"
What this passing in a new Locale to the ExecutionInput or was this a JVM defaulting to Locale?
We don't have a way to disable Localisation - its an intended feature and works as far as we can see this end so being able to reproduce the bug is essential to getting a fix
What JVM are you running, what version? What environment are you running this in?
Can you write a simple reproduction program to show this happening?
We will need more reproduction details to help here
My Default Locale Country code is "es_IN" but I have changed using by locale(new Locale("en", "US")).
I'm using java version
java 11.0.16.1 2022-08-18 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.16.1+1-LTS-1)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.16.1+1-LTS-1, mixed mode)
These are the fallback property files that should be used during ResourceBundle.getBundle()
I used this gradle file say ( a simple IDEA generated one)
plugins {
id 'java'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
implementation 'com.graphql-java:graphql-java:19.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}
test {
useJUnitPlatform()
}
I can't reproduce this - even if I set my Java locale to be en_IN on the command line or inside the program.
I am starting to think this must be something unique on your system. Because 19.x has been out for a while and lots of international (and Indian) developers are using it.
I'm creating jira-data-center plugin and my all code running under the jira platform.
I do know a little about this - I worked on the Jira server platform about 6 years ago and still work for Atlassian. Jira Server uses OSGI for its plugin system. OSGI is at its heart a fancy class loader system and it sounds like you have some sort of class loading issue. And to confuse things it calls its modules "bundles" and we are having a "resource bundle" problem in a "osgi bundle".
For example your graphql code is probably being called in the context of another OSGi plugin (or the master monolith bundle 0) and some how your OSGi bundle is not exporting access to these resources some how?? But I dont know off hand.
Are your bundling graphql-java 19.2 as jar inside your plugin (osgi bundle) or are you trying to run graphql-java as a OSI bundle itself. Because I am not sure the latter works but I haven't tried it (I left OSGi land 4 years ago)
I have raised #3038 and hope to get a 19.3 out to see if this help you
I had one of the OSGI gurus in Atlassian try my test program above inside a jira plugin and it all worked as expected and hence there must be something else going on in how you package your plugin code perhaps
I have upgrade the version 19.3 and tried but result is same error.
I also tired with add custom properties file and call. Its working but when move this file under any folder like i18n and call then same error getting.
so I think jira not allow call resource file with "."
mean basename "i18n.validation" not support and throw error but when only call "validation" that is ok.
Can you confirm me graphql-java 17.4 is fixed below vulnerability
"graphql-java before19.0 is vulnerable to Denial of Service. An attacker can send a malicious GraphQL query that consumes CPU resources. The fixed versions are 19.0 and later, 18.3, and 17.4, and 0.0.0-2022-07-26T05-45-04-226aabd9."
Activity
dondonz commentedon Nov 30, 2022
Hello, thanks for raising the issue! That's a bug and we'll fix it
It's a problem with not handling the region
INkhilendra commentedon Nov 30, 2022
ok so what can I do for now.
I want to run my application with using 19.0+
bbakerman commentedon Nov 30, 2022
Donna might have jumped the gun here sayings its a know bug.
I have created a PR showing that resource bundle lookup works as expected
#3036
but we are not i18n super experts so perhaps there is a situation we are not aware of - for example some defaulting on a computer running in India for example?? Or some other overriding in place some how
but the ResourceBundle lookup is working as we would expected given the tests in that PR
khilendra commentedon Nov 30, 2022
But I have also tried with US timezone and same error give me
khilendra commentedon Nov 30, 2022
I do not want to use i18n feature when executing query so how can ignore or disable?
bbakerman commentedon Nov 30, 2022
Can you please tell us more about how you "tried with US timezone"
What this passing in a new Locale to the ExecutionInput or was this a JVM defaulting to Locale?
We don't have a way to disable Localisation - its an intended feature and works as far as we can see this end so being able to reproduce the bug is essential to getting a fix
What JVM are you running, what version? What environment are you running this in?
Can you write a simple reproduction program to show this happening?
We will need more reproduction details to help here
khilendra commentedon Dec 1, 2022
This is my code base for execution
My Default Locale Country code is "es_IN" but I have changed using by locale(new Locale("en", "US")).
I'm using java version
java 11.0.16.1 2022-08-18 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.16.1+1-LTS-1)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.16.1+1-LTS-1, mixed mode)
bbakerman commentedon Dec 1, 2022
Can you please try to run this code on your system with graphql-java 19.2 on the class path
When I run this on my system (with 19.2 graphql -java on the class path) I get
Can you inspect your graphql-java 19.2 jar and check there is a set of files
These are the fallback property files that should be used during
ResourceBundle.getBundle()I used this gradle file say ( a simple IDEA generated one)
I can't reproduce this - even if I set my Java locale to be en_IN on the command line or inside the program.
I am starting to think this must be something unique on your system. Because 19.x has been out for a while and lots of international (and Indian) developers are using it.
khilendra commentedon Dec 1, 2022
@bbakerman Thanks for the brief details.
I have run your code with simple java and its running perfectly as you mention expected result, I'm also getting.
Also checked you library and here i18n/Validation.properties file exists
I'm creating jira-data-center plugin and my all code running under the jira platform.
so may be this issue is coming from atlassian environment side.
I will contact with atlassain teams.
Again thanks you for quick reply.
bbakerman commentedon Dec 1, 2022
I do know a little about this - I worked on the Jira server platform about 6 years ago and still work for Atlassian. Jira Server uses OSGI for its plugin system. OSGI is at its heart a fancy class loader system and it sounds like you have some sort of class loading issue. And to confuse things it calls its modules "bundles" and we are having a "resource bundle" problem in a "osgi bundle".
For example your graphql code is probably being called in the context of another OSGi plugin (or the master monolith bundle 0) and some how your OSGi bundle is not exporting access to these resources some how?? But I dont know off hand.
Are your bundling graphql-java 19.2 as jar inside your plugin (osgi bundle) or are you trying to run graphql-java as a OSI bundle itself. Because I am not sure the latter works but I haven't tried it (I left OSGi land 4 years ago)
bbakerman commentedon Dec 2, 2022
I have raised #3038 and hope to get a 19.3 out to see if this help you
I had one of the OSGI gurus in Atlassian try my test program above inside a jira plugin and it all worked as expected and hence there must be something else going on in how you package your plugin code perhaps
bbakerman commentedon Dec 2, 2022
graphql-java 19.3 has been released with the "class loader" used during resource loading - can you try that version and see if it helps you
khilendra commentedon Dec 2, 2022
@bbakerman
I have upgrade the version 19.3 and tried but result is same error.
I also tired with add custom properties file and call. Its working but when move this file under any folder like i18n and call then same error getting.
so I think jira not allow call resource file with "."
mean basename "i18n.validation" not support and throw error but when only call "validation" that is ok.
khilendra commentedon Dec 3, 2022
@bbakerman
Can you confirm me graphql-java 17.4 is fixed below vulnerability
"graphql-java before19.0 is vulnerable to Denial of Service. An attacker can send a malicious GraphQL query that consumes CPU resources. The fixed versions are 19.0 and later, 18.3, and 17.4, and 0.0.0-2022-07-26T05-45-04-226aabd9."
dondonz commentedon Dec 4, 2022
Hi @khilendra yes, graphql-java v17.4 contains the fix for the CVE.
You can reference the official CVE text: https://www.cve.org/CVERecord?id=CVE-2022-37734
PR with the fix for 17.4: #2902
dondonz commentedon Dec 4, 2022
And our release note: https://github.com/graphql-java/graphql-java/releases/tag/v17.4
khilendra commentedon Dec 4, 2022
Ok Thanks for reply and confirmation. So I'm going with 17.4 and its working with perfectly.