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

Bug nr14 #24

Closed
wants to merge 77 commits into from
Closed

Bug nr14 #24

wants to merge 77 commits into from

Conversation

dervism
Copy link

@dervism dervism commented Sep 9, 2014

Added test class for verifying bug nr 14. Seems to fixed. (Hackergarten Oslo)

kohsuke@unicorn and others added 30 commits December 2, 2007 21:02
… VerifyError if different versions of Groovy is used
kohsuke and others added 27 commits March 5, 2013 16:33
I consider it harmful that JSONUtils.quote() behaves differently when
the content of the string just so happens to look like a JavaScript
function.

While this behavior is documented, I can't think of any valid use case
for this --- if you want to produce a JavaScript function, one should
have used a JSONFunction instance, not a String that looks like a
function.

With such content sniffing, a calling application cannot safely rely on
this function. In certain situations, this can be exploited as a
vulnerability I'm building a JSON based on the user input.

The current behaviour also makes it impossible to generate a valid JSON
such as {"a":"function { something that looks like function }"}

This patch corrects this behaviour. It is a compatibility breaking
change, although I suspect hardly anyone would depend on this behaviour.
1. Upgraded dependencies to

 * groovy 2.1.1
 * commons-lang 2.6
 * junit 4.10

2. Exchange commons-logging for slf4j

3. Drop JDK3 branch, along with oro. JDK5 is the new baseline.
A bug like this seriously reduce my confidence in this library...
Upgrade Groovy, Junit and Slf4j dependencies to their latest versions
before merging code from jenkinsci/json-lib
Copyright notices were updated to current year
Removed e-amil from @author clause
Added sortPropertyNames to XMLSerializer to keep it in sync with what Jenkinsci expects,
however this setting is set to false by default (Jenkins requires it to be set to true)
JsonConfig.ignorePublicFields is set to false by default; Jenkins requires this to be set to true
 - reformat code and reapply license header
 - setup Gradle 2.0 build
 - rename package 'net.sf' to 'org.kordamp'
 - upgrade dependencies
Implemented list of elements which enforce creation of an array from
it’s childs even if there is no, only one or multiple elements with
different name in it.
In case of different name, information gets lost but it will be done
with a log warning.
Exchanged slf4j test dependency to a test agnostic slf4j implementation
which allows us to actually check the log messages.
Fixed warning message not being logged.
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 8a9bca6 on dervism:BugNr14 into * on aalmiray:master*.

@aalmiray
Copy link
Collaborator

We can't take this PR as it includes more changes than the needed ones.

@aalmiray aalmiray closed this Dec 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants