6.0.0-git
2021-01-19

[#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 2011-04-13 (3569 days ago)
Due
Updated 2011-06-16 (3505 days ago)
Assigned 2011-04-14 (3568 days ago)
Resolved 2011-06-15 (3506 days ago)
Milestone
Patch No

History
2011-06-16 07:57:03 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
2011-06-15 22:18:06 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
2011-06-15 22:14:22 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
2011-05-04 13:40:24 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.
2011-05-04 13:36:51 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
2011-05-04 08:40:41 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
2011-04-14 14:11:31 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.
2011-04-14 14:06:45 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.
2011-04-14 14:03:25 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
2011-04-14 13:41:46 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?
2011-04-14 07:32:00 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.".
2011-04-14 03:18:16 Michael Rubinsky Comment #4
State ⇒ Feedback
Reply to this comment
Can you try what I just committed?
2011-04-14 03:17:50 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
2011-04-13 14:06:02 Michael Rubinsky Comment #2
Assigned to Michael Rubinsky
State ⇒ Assigned
Reply to this comment
This is an integer overflow being caused somewhere between Facebook and horde.
2011-04-13 07:29:37 acn (at) annachristina (dot) eu Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ facebook integration: UID wrong
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
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