Hi!
I also wanted to run DNOI under mono 2.4. I've chosen the latest from
the 2.5 branch, because I thought it was more stable, but I encounter
the same bugs unfortunately.
For me the problem was with google's openid provider. It sent me 4
services:
<URI>
https://www.google.com/accounts/o8/ud</URI>
<URI>
https://www.google.com/accounts/o8/ud?source=mail</URI>
<URI>
https://www.google.com/accounts/o8/ud?source=gmail.com</URI>
<URI>
https://www.google.com/accounts/o8/ud?source=googlemail.com</URI>
From which some method created this:
<URI>
https://www.google.com/accounts/o8/ud?source=googlemail.com</URI>
<URI>
https://www.google.com/accounts/o8/ud?source=googlemail.com</URI>
<URI>
https://www.google.com/accounts/o8/ud?source=googlemail.com</URI>
<URI>
https://www.google.com/accounts/o8/ud?source=googlemail.com</URI>
So the count stayed, but the content was garbled up. After hours of
putting Logger.Debug messages all over the place this was the point
where I found the error:
[XrdElement.cs; searchForServiceTypUris method]
foreach (XPathNavigator service in Node.Select(xpath.ToString(),
XmlNamespaceResolver)) {
var se = new ServiceElement(service, this);
foreach (var u in se.UriElements)
{
Logger.Debug(u.Uri.ToString());
}
services.Add(se);
}
foreach (var srv in services)
foreach (var u in srv.UriElements)
{
Logger.Debug(u.Uri.ToString());
}
}
Here, in the first loop I get 4 separate URIs, but after adding them
to the list and querying them again, I only get the last one back four
times.
Seems like the problem is with XPathNavigator, and indeed, replacing
var se = new ServiceElement(service, this);
with
var se = new ServiceElement(service.Clone(), this);
solved the problem in this case. Seems like this is some kind of
referencing problem of some sort.
I try to track down some further issues with DNOI under mono,
hopefully most of the other bugs are caused by this issue too.
Regards,
Zsolt Sz. Sztupák
On máj. 21, 05:45, Andrew Arnott <
andrewarn...@gmail.com> wrote:
> Hi Derek,
>
> I'm sorry it's been a week and I haven't had time to drill into this any
> further. Anything you can do to figure out exactly what's wrong with
> XPathNavigator in mono or to get as close to it as you can and file a bug
> with mono would be excellent. DNOA is open source, so if all you can do is
> offer a repro that involves the library and a few hints of what you've
> found, that might be enough for the mono community to figure it out.
>
> --
> Andrew Arnott
> "I [may] not agree with what you have to say, but I'll defend to the death
> your right to say it." - S. G. Tallentyre
>
> >>> 2009/5/13 Andrew Arnott <
andrewarn...@gmail.com>
>
> >>>> On the contrary, Derek, you're being very helpful. The log was great.
> >>>> Here's the problem:
>
> >>>> 13-05-2009 17:16:46,626 DEBUG [10] HTTP GET
> >>>>
http://dereke.myopenid.com/?xrds=1(Http:0)
> >>>> * ProviderEndpoint:
http://dereke.myopenid.com/*
> >>>> wrong. That should be the OP endpointhttp://
www.myopenid.com/server.
> >>>> I can only guess that there's something that mono is getting wrong in XML
> >>>> parsing or the LINQ that DNOA uses in processing the XRDS file that is
> >>>> causing the OP endpoint to get lost and this other URL to be used instead.
>
> >>>> Can't repro it at work as I said before, unfortunately. But if you've
> >>>> figured out how to get the debugger going, setting a breakpoint at the early
> >>>> discovery phase (just before the ServiceEndpoint is constructed) should help
> >>>> you figure out what's going wrong.
>
> >>>> --
> >>>> Andrew Arnott
> >>>> "I [may] not agree with what you have to say, but I'll defend to the
> >>>> death your right to say it." - Voltaire
>
> >>>> On Wed, May 13, 2009 at 9:22 AM, Derek Ekins <
de...@spathi.com> wrote:
>
> >>>>> Log attached.
>
> >>>>> I also notice on the last line (trimmed):
> >>>>> Redirecting to
> >>>>>
http://dereke.myopenid.com/?openid.identity=http%3a%2f%2fdereke.myope...
>
> >>>>> however when running on
ms.net it does this redirect:
> >>>>> Redirecting to
> >>>>>
http://www.myopenid.com/server?openid.claimed_id=http%3a%2f%2fdereke....
>
> >>>>> If I replace
derek.myopenid.com?
withwww.myopenid.com/server?the
> >>>>> request does actually work.
> >>>>> So I guess there are two problems here. The exception that gets created
> >>>>> earlier on, and then redirecting to the wrong place here.
>
> >>>>> Sorry I am not familiar with the code base so am probably not being
> >>>>> much help!
>
> >>>>> 2009/5/13 Andrew Arnott <
andrewarn...@gmail.com>
>
> >>>>>> Derek,
>
> >>>>>> Can you include the entire log of the exchange? For OpenID 2.0
> >>>>>> providers, DNOA first tries SHA256 and falls back to SHA1 if the OP asks it
> >>>>>> to.
myopenid.com shouldn't be asking it to, so there's an
> >>>>>> interesting bug somewhere... seeing the entire log may help me figure out
> >>>>>> what's going on.
>
> >>>>>> The Key-Value Form error you're getting happens when the OP sends back
> >>>>>> an illegal response from its OP endpoint. But I suspect the request isn't
> >>>>>> being correctly formulated (mono problem most likely) so myopenid.commay be getting confused.
>
> >>>>>> --
> >>>>>> Andrew Arnott
> >>>>>> "I [may] not agree with what you have to say, but I'll defend to the
> >>>>>> death your right to say it." - Voltaire
>
> >>>>>> On Wed, May 13, 2009 at 9:03 AM, Derek Ekins <
de...@spathi.com>wrote:
>
> >>>>>>> It is failing with:
> >>>>>>> An error occurred while trying to create an association with
> >>>>>>>
http://dereke.myopenid.com/.
> >>>>>>> DotNetOpenAuth.Messaging.ProtocolException: Cannot decode Key-
> >>>>>>> Value Form because a line was found without a ':' character. (line
> >>>>>>> 2: '<html>') ---> System.FormatException: Cannot decode Key-Value Form
> >>>>>>> because a line was found without a ':' character. (line 2: '
> >>>>>>> <html>')
>
> >>>>>>> This is from the AssociationManager class.
>
> >>>>>>> I notice that just before this that (on mono) it says that it is
> >>>>>>> using SHA1:
> >>>>>>> openid.assoc_type: HMAC-SHA1
> >>>>>>> openid.session_type: DH-SHA1
>
> >>>>>>> but on
ms.net it says:
> >>>>>>> openid.assoc_type: HMAC-SHA256
> >>>>>>> openid.session_type: DH-SHA256
>
> >>>>>>> not sure why it is using a different encryption method.
> >>>>>>> Would this be a problem? Can you re-configure that?
>
> >>>>>>> 2009/5/13 Andrew Arnott <
andrewarn...@gmail.com>
>
> >>>>>>>> Let us know how your investigation progresses, by all means.
>
> >>>>>>>> I can't test any further because I'm at work, and mono seems to have
> >>>>>>>> issues with every new proxy tag I add to web.config, so I'll have to wait
> >>>>>>>> till I get home. (probably better that way anyway)
>
> >>>>>>>> --
> >>>>>>>> Andrew Arnott
> >>>>>>>> "I [may] not agree with what you have to say, but I'll defend to the
> >>>>>>>> death your right to say it." - Voltaire
>
> >>>>>>>> On Wed, May 13, 2009 at 8:06 AM, Derek Ekins <
de...@spathi.com>wrote:
>
> >>>>>>>>> Great.
> >>>>>>>>> I am not using any of the webforms integration so didn't have any
> >>>>>>>>> of those problems...
> >>>>>>>>> Just realised I had only tested it with google open id.. just tried
> >>>>>>>>> it with
myopenid.com and it is failing still.. will keep looking
> >>>>>>>>> into it
>
> >>>>>>>>> 2009/5/13 Andrew Arnott <
andrewarn...@gmail.com>
>
> >>>>>>>>>> Hi Derek,
>
> >>>>>>>>>> It took a few minutes, but I got one of the sample RPs running on
> >>>>>>>>>> mono on Windows. I had to add to the MONO_PATH to include some dependency
> >>>>>>>>>> DLLs, and I had to remove the <defaultProxy> element from web.config, and of
> >>>>>>>>>> course I had to remove the cache policy field you mentioned. But yes, the
> >>>>>>>>>> RP worked (mostly) after that.
>
> >>>>>>>>>> I say mostly because for some reason the home page of
> >>>>>>>>>> OpenIdRelyingPartyWebForms isn't fully rendered. (it's missing the link to
> >>>>>>>>>> the members only page). That's worth a mono bug right there.
>
> >>>>>>>>>> Anyway, that field you had to remove looks like it was added for
> >>>>>>>>>> an idea that didn't end up sticking. So yes, future releases will have it
> >>>>>>>>>> removed. Thanks for bringing this up.
> >>>>>>>>>> --
> >>>>>>>>>> Andrew Arnott
>
> ...
>
> tovább »- Idézett szöveg elrejtése -
>
> - Idézett szöveg megjelenítése -