6.0.0-git
2019-04-24

[#13336] Activesync: Clicking on remove button removes the wrong entry
Summary Activesync: Clicking on remove button removes the wrong entry
Queue Horde Groupware Webmail Edition
Queue Version 5.2.0
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester software-horde (at) interfasys (dot) ch
Created 2014-07-09 (1750 days ago)
Due
Updated 2014-11-09 (1627 days ago)
Assigned 2014-07-10 (1749 days ago)
Resolved 2014-07-10 (1749 days ago)
Milestone
Patch No

History
2014-11-09 18:58:49 Git Commit Comment #16 Reply to this comment
Changes have been made in Git (master):

commit d866a3129f1933f7a74dd1551349288fd4c8b0f9
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Jul 10 13:57:45 2014 -0400

     Bug: 13336 Fix removing device state when multiple accounts exist 
on the same device.

     Conflicts:
             horde/admin/activesync.php

  horde/admin/activesync.php                       |    9 +++++++--
  horde/templates/activesync/device_table.html.php |   10 +++++-----
  2 files changed, 12 insertions(+), 7 deletions(-)

http://github.com/horde/horde/commit/d866a3129f1933f7a74dd1551349288fd4c8b0f9
2014-07-10 18:07:57 software-horde (at) interfasys (dot) ch Comment #15 Reply to this comment
Fixed for 5.2.1
Thank you!
2014-07-10 18:01:36 Michael Rubinsky Comment #14
State ⇒ Resolved
Reply to this comment
Fixed for 5.2.1
2014-07-10 18:00:51 Git Commit Comment #13 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 01b26397a1668fa25e2849f6b3b4710678544bf8
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Jul 10 13:57:45 2014 -0400

     Bug: 13336 Fix removing device state when multiple accounts exist 
on the same device.

  horde/admin/activesync.php                       |   10 ++++++++--
  horde/templates/activesync/device_table.html.php |   10 +++++-----
  2 files changed, 13 insertions(+), 7 deletions(-)

http://github.com/horde/horde/commit/01b26397a1668fa25e2849f6b3b4710678544bf8
2014-07-10 17:28:21 Michael Rubinsky Comment #12
State ⇒ Assigned
Reply to this comment
Nevermind. In my testing, it just so happened that the entry I was 
removing was the one that existed in that array.
2014-07-10 17:19:11 Michael Rubinsky Comment #11 Reply to this comment
It's defined in javascript when the button click is caught.

Look in activesyncadmin.js
I see this:
$('uid').setValue(this.devices[id.substr(7)].user);

and that seems wrong as a device has several users
If you actually look at the value of the this.devices hash, you will 
see there is a different entry for each device/user combination.
2014-07-10 17:08:32 software-horde (at) interfasys (dot) ch Comment #10 Reply to this comment
It's defined in javascript when the button click is caught.

Look in activesyncadmin.js
I see this:
$('uid').setValue(this.devices[id.substr(7)].user);

and that seems wrong as a device has several users

2014-07-10 16:33:41 Michael Rubinsky Comment #9 Reply to this comment
It's defined in javascript when the button click is caught.

Look in activesyncadmin.js
2014-07-10 00:13:57 software-horde (at) interfasys (dot) ch Comment #8 Reply to this comment

[Show Quoted Text - 11 lines]
I've just tested again and it deletes the entry below it. The device 
has 7 accounts.
We're using Horde_ActiveSync_State_Sql

I've noticed that the button has a remove_deviceID variable, but I 
couldn't find where the uid is defined.
2014-07-09 23:39:05 Michael Rubinsky Comment #7
State ⇒ Feedback
Reply to this comment
Actually, no. We already differentiate that when the form is 
submitted. I just tested with two accounts on the same device, and 
clicking remove on one entry removes the correct account's state.

You are going to have to find out why this does not work this way 
locally for you.

What state driver are you using for activesync? You can start to look 
in Horde_ActiveSync_State_Sql::removeState() or 
Horde_ActiveSync_State_Mongo::removeState() depending on the driver in 
use.
2014-07-09 17:38:23 Michael Rubinsky Comment #6
Assigned to Michael Rubinsky
State ⇒ Assigned
Reply to this comment
One device can have several email accounts which are synchronised 
with Horde, that's the reason I didn't know how to name an entry 
from that list.
Ah. That makes more sense. I probably didn't differentiate accounts vs 
device_id on those buttons.
2014-07-09 17:37:03 Michael Rubinsky Comment #5 Reply to this comment
Yes, that's the page I'm talking about as well.
2014-07-09 17:04:33 software-horde (at) interfasys (dot) ch Comment #4 Reply to this comment
Maybe I should have mentioned that the URL of the page is:
horde/admin/activesync.php
2014-07-09 16:47:42 software-horde (at) interfasys (dot) xh Comment #3 Reply to this comment
What do you mean by "removed the wrong email address".  Email 
addresses have nothing to do with that page. Do you mean it removed 
the wrong device?  If so, I cannot reproduce. I am *constantly* 
removing devices from that page during testing and do not have any 
issues.
One device can have several email accounts which are synchronised with 
Horde, that's the reason I didn't know how to name an entry from that 
list.

See if you can reproduce it when removing one of the many entries (not 
the last one) linked with one device.

I'm not sure if the state makes a difference. I was trying to remove 
entries for accounts which wouldn't sync and we're shown as 
unprovisioned.
2014-07-09 15:57:03 Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
What do you mean by "removed the wrong email address".  Email 
addresses have nothing to do with that page. Do you mean it removed 
the wrong device?  If so, I cannot reproduce. I am *constantly* 
removing devices from that page during testing and do not have any 
issues.
2014-07-09 11:26:38 software-horde (at) interfasys (dot) ch Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Activesync: Clicking on remove button removes the wrong entry
Queue ⇒ Horde Groupware Webmail Edition
Milestone ⇒
Patch ⇒ No
Reply to this comment
On the activesync page listing all the email accounts which are 
connected to the system, we're presented with 3 buttons: Wipe, remove 
and Block.

Clicking on "remove", removed the wrong email address from the list

Saved Queries