]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/Error:_OpenID_failure:_time_bad_sig:.mdwn
ikiwiki (3.20140916) unstable; urgency=low
[ikiwiki.git] / doc / bugs / Error:_OpenID_failure:_time_bad_sig:.mdwn
1 Sometimes when I try to login (to edit a page) here then I can see
2 the following error message:
3
4     Error: OpenID failure: time_bad_sig:
5
6 Please note that authorization process successes on OpenID server side.
7
8 It occurs both for [getopenid.com](http://www.getopenid.com/)
9 and [myopenid.com](http://www.myopenid.com/) servers I use.
10
11 I'm reporting this, but I'm not sure whether a problem is with your
12 ikiwiki or my OpenID servers. --[[PaweÅ‚|ptecza]]
13
14 > I've seen this too, once or twice (using myopenid), and reauthenticating
15 > fixed it -- so I can't reproduce it reliably to work on it. I think I've
16 > seen it both on this wiki and on the one running on my laptop.
17
18 > The perl openid client module seems
19 > to fail with time_bad_sig if the time in the signature from the other end
20 > is "faked". I'm not 100% sure what this code does yet:
21
22         # check age/signature of return_to
23         my $now = time();
24         {
25                 my ($sig_time, $sig) = split(/\-/, $self->args("oic.time") || "");
26                 # complain if more than an hour since we sent them off
27                 return $self->_fail("time_expired")   if $sig_time < $now - 3600;
28                  also complain if the signature is from the future by more than 30 seconds,
29                 # which compensates for potential clock drift between nodes in a web farm.
30                 return $self->_fail("time_in_future") if $sig_time - 30 > $now;
31                 # and check that the time isn't faked
32                 my $c_secret = $self->_get_consumer_secret($sig_time);
33                 my $good_sig = substr(OpenID::util::hmac_sha1_hex($sig_time, $c_secret), 0, 20);
34                 return $self->_fail("time_bad_sig") unless $sig eq $good_sig;
35         }
36
37 > At least it doesn't seem to be a time sync problem since the test for too
38 > early/too late times have different error messages.. --[[Joey]]
39
40 I've had this problem too, but with my track record of reporting OpenID bugs 
41 I thought it best if I held my tongue. I usually experience this the first
42 time I sign in on any ikiwiki installation of {ikiwiki.kitenet, ikidev, 
43 betacantrips}, and I think re-logging in always works. --Ethan
44
45 > Does seem easier to repro than I thought.
46 > Ok, fixed it.. done --[[Joey]] (reopened for new instance of same error
47 > message below)
48
49 ----
50
51 ## the return of the nasty bug
52
53 Hmmmmm, looks like it is not entirely fixed.  I am getting it on my own
54 [blog](http://blog.tobez.org/).  Just upgraded to 3.20110430, same same.
55 I am using custom openid with redirection to myopenid.com.
56 Please tell me if you need more info.  The same openid worked fine to login to *this* site to post this.
57 -- Anton
58
59 > Well, this bug is from 2007. Probably you are not encountering the same
60 > bug.
61
62 > I also have a openid delegation to myopenid, and I can reproduce the
63 > problem when logging into your site.
64 >
65 > What version of the
66 > Net::OpenId::Consumer perl library do you have installed? --[[Joey]] 
67
68 >> It is the latest version from FreeBSD's ports collection,
69 >> which happens to be a [slightly patched up](http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/net/p5-Net-OpenID-Consumer/files/patch-Consumer.pm?rev=1.2;content-type=text%2Fplain)
70 >> variant of an
71 >> ["unauthorized" CPAN release 1.06](http://search.cpan.org/~gugu/Net-OpenID-Consumer-1.06/)
72 >>
73 >> Do you think it might be a good idea to try with 1.03 or with an unpatched 1.06?
74 >> -- Anton
75
76 >>> Absolutely. --[[Joey]] 
77
78 >>>> 1.03 fails with "Error: login failed, perhaps you need to turn on cookies?" (needless to say cookies are enabled).  
79 >>>> Unpatched 1.06 fails with "Error: login failed, perhaps you need to turn on cookies?".  
80 >>>> 1.03 with the same patch fails with "Error: OpenID failure: time_bad_sig:" -- Anton.
81
82 >>>>> Investigation revealed it was a bug in the freebsd patch, which I
83 >>>>> understand is going to be dealt with. [[done]] --[[Joey]] 
84
85 I am getting the same error here with ikiwiki 3.20120629 (wheezy). I had trouble with ikiwiki-hosting configurations of OpenID, basically related to the `openid_realm` parameter - which I had to comment out. But now it seems to fail regardless. --[[anarcat]]
86
87 > Nevermind, this was because I was blocking cookie on the CGI (!!). Message *could* be improved though, it's not the first time i stumble upon this... --[[anarcat]]