#118 anyURI Serialization problem

0.65
closed-fixed
nobody
5
2007-10-02
2006-10-02
John D
No

The anyURI type defined in SOAP::Serializer will match
any string that contains http://

The code needs to be changed to:

'anyURI' =>
[95, sub { $_[0] =~ /^(urn:|http:\/\/)/i;
}, 'as_anyURI'],

The way the code is written now, ONLY urn: is anchored
to the beginning of the line.

The problem basically causes ANY string containing
http:// to be encoded as a URI rather than a string.

We also noticed (because of this bug) that data encoded
as anyURI is not XML compliant. The following
characters: & < > are not encoded leading to
deserialization errors.

Discussion

  • John D

    John D - 2006-10-02

    Patch to fix problems with the anyURI data type

     
  • John D

    John D - 2006-10-02

    Logged In: YES
    user_id=978068

    The second problem was caused by a missing function:
    as_anyURI. I am including a patch that fixes both issues. I
    think this issue may be causing many of the other issues
    currently open about strings not being encoded correctly.

     
  • Marcos Daniel Marado Torres

    Logged In: YES
    user_id=512911

    Closing this bug should close 1569418 too. This patch should
    be into the next version...

     
  • ^m'e

    ^m'e - 2007-06-19

    Logged In: YES
    user_id=1821823
    Originator: NO

    Hi there,

    I tried the proposed patch with release 0.69 from CPAN. It works, though it causes one warning and a possibly major annoyance with test #08:

    $ ./TEST.pl 08-schema.t
    08-schema....Subroutine SOAP::XMLSchema2001::Deserializer::as_anyURI redefined at
    ../lib/SOAP/Lite.pm line 289.
    08-schema....ok 24/47# Failed test 25 in 08-schema.t at line 82 fail #11
    08-schema....NOK 25# 08-schema.t line 82 is: ok($@ =~ m!Unrecognized type
    '{http://www.w3.org/1999/XMLSchema}$_'!);
    08-schema....FAILED test 25
    Failed 1/47 tests, 97.87% okay
    Failed Test Stat Wstat Total Fail Failed List of Failed
    --------------------------------------------------------------------------------------------
    08-schema.t 47 1 2.13% 25
    Failed 1/1 test scripts, 0.00% okay. 1/47 subtests failed, 97.87% okay.

    Line 289 of Lite.pm is, after patching:

    sub as_anyURI; *as_anyURI = \&SOAP::XMLSchema1999::Deserializer::as_anyURI;

    Thus, I'm a bit reluctant in using it on a production system, unless you tell me it's OK...

    Cheers,

    ^m'e

     
  • Martin Kutter

    Martin Kutter - 2007-10-02
    • assigned_to: byrnereese --> nobody
    • status: open --> closed-fixed
     
  • Martin Kutter

    Martin Kutter - 2007-10-02

    Logged In: YES
    user_id=884175
    Originator: NO

    Patch applied as of 1.44 in CVS.

    The patch included a few errors, it accidentally declared (but did not define) as_anyURI in SOAP::Deserializer::XMLSchema1999.

    Errors fixed, too.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks