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

fixed JRuby schema validation when XSD has DOCTYPE to DTD #912

Merged
merged 1 commit into from
Jun 3, 2013
Merged

fixed JRuby schema validation when XSD has DOCTYPE to DTD #912

merged 1 commit into from
Jun 3, 2013

Conversation

patcheng
Copy link

@patcheng patcheng commented Jun 3, 2013

consolidation of #791 and #810

when XSD has DOCTYPE to DTD, not able to load the file.

and the ruby script is run without path, NullPointerException got thrown.

Test to demostrate #791
@leejarvis
Copy link
Member

This looks great, thanks for the quick response Patrick!

leejarvis added a commit that referenced this pull request Jun 3, 2013
fixed JRuby schema validation when XSD has DOCTYPE to DTD
@leejarvis leejarvis merged commit e2c5413 into sparklemotion:master Jun 3, 2013
@pebrinic
Copy link

pebrinic commented Jun 5, 2013

Awesome fix! Would it be possible to get a new RC built with this change?

@flavorjones
Copy link
Member

1.5.10 will be released later today with this fix.

@ppg
Copy link

ppg commented Aug 2, 2013

Hi,

I believe I'm still hitting an issue with this on Ubuntu 8.04 (and 10.04). Ruby-saml is trying to read the protocol XSD file mentioned in a related issue and its generating a segfault:

../shared/bundle/ruby/1.8/gems/nokogiri-1.5.10/lib/nokogiri/xml/schema.rb:37: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux]

This is running through passenger 3.0.7 and fronted by apache2 (whatever the up-to-date package is on 8.04 and 10.04). Predictably it stops any saml authentication (i.e. through omniauth) from working.

The odd parts are:

  • This works on my development machine (10.04) just fine, but not on an internal testing server (tried both 8.04 and 10.04; note this is a vmware virtual machine if that affects anything)
  • If I run the Nokogiri::XML::Schema.new() call with the XSD file in IRB, it complains about the formatting of it (on both my development machine and the internal testing server which I also find wierd), but it doesn't generate a segfault.

So my questions are is this the same issue that wasn't fixed all the way, or am I seeing something different? And why the odd behavior where same OS, dependencies, etc. seem to behave differently on the two different machines? And how can I trace down further what is causing this issue and either fix it or workaround it?

Thanks,
\Peter

@ppg
Copy link

ppg commented Aug 2, 2013

Hmm, so I didn't realize that the chdir from ruby-saml was important to be able to find the other schemas in the directory. Now that I have that working, my development machine correctly parses the schema and returns a Nokogiri::XML::Schema object in IRB. However, now the confusing part is that the internal test server also can parse it in IRB, but when running under passenger/apache its segfaulting? I feel better about it correctly parsing on my development machine, since it works correctly there, but I feel farther from a solution with less info because now I'm at a loss on how to figure out why its segfaulting? Any suggestions?

Thanks,
\Peter

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.

5 participants