6.0.0-beta1
7/13/25

[#9889] facebook integration: UID wrong
Summary facebook integration: UID wrong
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester acn (at) annachristina (dot) eu
Created 04/13/2011 (5205 days ago)
Due
Updated 06/16/2011 (5141 days ago)
Assigned 04/14/2011 (5204 days ago)
Resolved 06/15/2011 (5142 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/16/2011 07:57:03 AM acn (at) annachristina (dot) eu Comment #15 Reply to this comment
I just manually added the lines to Facebook/Request.php and it looks 
like it is finally working!
Thanks a lot :)

Regards,
Anna Christina
06/15/2011 10:18:06 PM Michael Rubinsky Comment #14
State ⇒ Resolved
Reply to this comment
Finally got a chance to install a 32bit vm to test this.

Fixed for Horde 4.0.7
06/15/2011 10:14:22 PM Git Commit Comment #13 Reply to this comment
Changes have been made in Git for this ticket:

Bug: 9889  Fix integer overflow from certain facebook responses.
FB sometimes sends single numeric-like values back, in stead of json
encoded arrays. These are always converted to floats by json_decode().
Work around this by either the JSON_BIGINT_AS_STRING constant or
sniffing out the numeric type.

  1 files changed, 9 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/3bd64cd882e9a9266364f93658227930d125d1fb
05/04/2011 01:40:24 PM Michael Rubinsky Comment #12 Reply to this comment
I fixed the undefined error, and log the exception that was causing 
that code to be reached for you. Though the original overflow issue 
hasn't been looked at yet. Need to find time to setup a 32bit vm to 
test this.
05/04/2011 01:36:51 PM Michael Rubinsky Comment #11 Reply to this comment
Changes have been made in Git for this ticket:

Fix clearing UID facebook pref when there is an error.
Related to Bug: 9899

   1 files changed, 2 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/36b460d7591e4ccf68e9e10eb9188733ade24783
05/04/2011 08:40:41 AM acn (at) annachristina (dot) eu Comment #10 Reply to this comment
After upgrading to Horde 4.0.2 et al (pear upgrade --alldeps -c 
horde), the problem still exists.

In horde.log, I found the following lines after trying to authorize my 
facebook account in horde:

2011-05-04T10:36:13+02:00 NOTICE: HORDE [horde] PHP ERROR: Undefined 
variable: uid [pid 31131 on line 450 of 
"/var/www/imzadi.de/www/wm/lib/Prefs/Ui.php"]
2011-05-04T10:36:17+02:00 NOTICE: HORDE [horde] PHP ERROR: Only 
variable references should be returned by reference [pid 31129 on line 
156 of "/usr/share/php/Horde/Service/Facebook/Auth.php"]
2011-05-04T10:36:18+02:00 NOTICE: HORDE [horde] PHP ERROR: Only 
variable references should be returned by reference [pid 31130 on line 
156 of "/usr/share/php/Horde/Service/Facebook/Auth.php"]
2011-05-04T10:36:20+02:00 NOTICE: HORDE [horde] PHP ERROR: Only 
variable references should be returned by reference [pid 31131 on line 
156 of "/usr/share/php/Horde/Service/Facebook/Auth.php"]

The basic problem -- the wrong uid being saved to the database -- 
still persists.

Regards,
Christina
04/14/2011 02:11:31 PM acn (at) annachristina (dot) eu Comment #9 Reply to this comment
Just reinstalled the PEAR package Horde_Service_Facebook and applied 
your commited patches manually - no change.
04/14/2011 02:06:45 PM Michael Rubinsky Comment #8
State ⇒ Assigned
Reply to this comment
Strange. This works perflectly for me on a new fb account with a
similarly large id.  Is your server 64 or 32 bit?
Debian 32 bit
I'll have to setup a 32bit vm to test this.
04/14/2011 02:03:25 PM acn (at) annachristina (dot) eu Comment #7 Reply to this comment
Strange. This works perflectly for me on a new fb account with a 
similarly large id.  Is your server 64 or 32 bit?
Debian 32 bit
04/14/2011 01:41:46 PM Michael Rubinsky Comment #6 Reply to this comment
Assuming that the installation provided by PEAR packages really uses 
the files in /usr/share/php/Horde/Service/Facebook, I tried -- and 
it won't fix the issue.
Now, additionally to the fact that the wrong UID is still written to 
the DB, the preferences page says "Could not find authorization for 
to interact with your Facebook account.
Strange. This works perflectly for me on a new fb account with a 
similarly large id.  Is your server 64 or 32 bit?
04/14/2011 07:32:00 AM acn (at) annachristina (dot) eu Comment #5 Reply to this comment
Assuming that the installation provided by PEAR packages really uses 
the files in /usr/share/php/Horde/Service/Facebook, I tried -- and it 
won't fix the issue.
Now, additionally to the fact that the wrong UID is still written to 
the DB, the preferences page says "Could not find authorization for to 
interact with your Facebook account.".
04/14/2011 03:18:16 AM Michael Rubinsky Comment #4
State ⇒ Feedback
Reply to this comment
Can you try what I just committed?
04/14/2011 03:17:50 AM Git Commit Comment #3 Reply to this comment
Changes have been made in Git for this ticket:

Ensure that this value is treated as a string to avoid issues due to overflows
(Hopefully) fixes Bug: 9889

  2 files changed, 3 insertions(+), 3 deletions(-)
http://git.horde.org/horde-git/-/commit/1598242d6e4a98614f00d463eb873c450f81fbf1
04/13/2011 02:06:02 PM Michael Rubinsky Comment #2
State ⇒ Assigned
Assigned to Michael Rubinsky
Reply to this comment
This is an integer overflow being caused somewhere between Facebook and horde.
04/13/2011 07:29:37 AM acn (at) annachristina (dot) eu Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ facebook integration: UID wrong
Type ⇒ Bug
Queue ⇒ Horde Framework Packages
Reply to this comment
In the current stable release (PEAR download, Horde_Service_Facebook 
1.0.0) of H4, the facebook integration gets a wrong UID when 
authorizing with fb.

My FB uid ends on ...2296, but after authorizing horde against my fb 
app, the UID ...2000 is written to the database.
This has the effect that in the preferences pane of horde, no picture 
is displayed and horde does not see that I'm authorized.


Saved Queries