Summary | removing user data doesn't work |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | mrubinsk (at) horde (dot) org |
Requester | vilius (at) lnk (dot) lt |
Created | 06/14/2011 (5143 days ago) |
Due | |
Updated | 09/04/2011 (5061 days ago) |
Assigned | 09/02/2011 (5063 days ago) |
Resolved | 09/03/2011 (5062 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
kronolith and mnemo removes shares of the admin who is deleting the
data, not the user's data.
for every preference in every application:
2011-09-04T10:14:28+03:00 DEBUG: HORDE [horde] SQL (0,0007s)
DELETE FROM horde_prefs WHERE pref_uid = 'turba3@lnk.lt' AND pref_name
= 'id' AND pref_scope = 'horde' [pid 11789 on line 801 of
"/usr/share/pear/Horde/Db/Adapter/Base.php"]
2011-09-04T10:14:28+03:00 DEBUG: HORDE [horde] SQL (0,0005s)
DELETE FROM horde_prefs WHERE pref_uid = 'turba3@lnk.lt' AND pref_name
= 'fullname' AND pref_scope = 'horde' [pid 11789 on line
801 of "/usr/share/pear/Horde/Db/Adapter/Base.php"]
2011-09-04T10:14:28+03:00 DEBUG: HORDE [horde] SQL (0,0005s)
DELETE FROM horde_prefs WHERE pref_uid = 'turba3@lnk.lt' AND pref_name
= 'from_addr' AND pref_scope = 'horde' [pid 11789 on line
801 of "/usr/share/pear/Horde/Db/Adapter/Base.php"]
2011-09-04T10:14:28+03:00 DEBUG: HORDE [horde] SQL (0,0005s)
DELETE FROM horde_prefs WHERE pref_uid = 'turba3@lnk.lt' AND pref_name
= 'location' AND pref_scope = 'horde' [pid 11789 on line
801 of "/usr/share/pear/Horde/Db/Adapter/Base.php"]
2011-09-04T10:14:28+03:00 DEBUG: HORDE [horde] SQL (0,0005s)
DELETE FROM horde_prefs WHERE pref_uid = 'turba3@lnk.lt' AND pref_name
= 'default_identity' AND pref_scope = 'horde' [pid 11789 on
line 801 of "/usr/share/pear/Horde/Db/Adapter/Base.php"]
etc. etc.
for kronolith and mnemo removes shares of the admin who is deleting
the data, not the user's data.
these messages:
DELETE FROM horde_prefs WHERE pref_uid = 'turba3@lnk.lt' AND pref_name
user's prefs for all applications. At most this should only be called
N number of times where N is the number of applications installed. It
also shouldn't be appending the pref_name clause. Following the code,
I don't see why that would be happening. Are the user's prefs removed
from storage?
Delete all of the shares owned by $user, not just the default.
Bug: 102411 files changed, 14 insertions(+), 19 deletions(-)
http://git.horde.org/horde-git/-/commit/924698eb30c877c194012c2bea739645504a7843
Need the shares owned by $user, not current user.
Bug: 102411 files changed, 2 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/6c52d2c5d95c9826205fe9aae90e7377541e572e
oops. We want the shares owned by $user, not current user.
Bug: 102411 files changed, 3 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/8175bae5a8bf81117da207a4f351bacd4fd33800
mnemo_sharesng are still there.
Uf, this a little bit bad, but I just noticed that removeUserData for
kronolith and mnemo removes shares of the admin who is deleting the
data, not the user's data.
DELETE FROM kronolith_sharesng_groups WHERE share_id = 450
[pid 31447 on line 801 of "/usr/share/pear/Horde/Db/Adapter/Base.php"]
DELETE FROM mnemo_sharesng_users WHERE share_id = 462 [pid
31447 on line 801 of "/usr/share/pear/Horde/Db/Adapter/Base.php"]
Both shares_ids are mine :(.
Also during debuging I've noticed that horde does spit a lot of these
messages:
DELETE FROM horde_prefs WHERE pref_uid = 'turba3@lnk.lt' AND pref_name
They are executed like 40 or 50 times.
removal? Because currently they still do.
driver should be removed. So, if you are using the ng sql driver, then
no, they shouldn't still exist. If you are using the legacy sql share
driver, then the ng table would not be touched. If you *are* using the
ng driver, then check your log for any errors and post back. I've
tested locally with both sql drivers and all user-owned shares are now
properly removed.
horde_history
what has happened. They are necessary e.g., If some other user (User
B) had rights to the deleted user's (User A) address book, and User B
has it set to synch to one of his devices, then the history entries
are necessary to ensure User A's entries are properly removed from
User B's device(s).
driver itself. The API doesn't contain any facility for deleting a
specific user's entries in that table. Instead, it deletes all entries
that are older than a configurable time-period.
removal? Because currently they still do.
I have also grepped database for the user in question. Entries in
horde_history and imp_sentmail persist too.
Fix kronolith's removeUserData API
Bug: 102414 files changed, 51 insertions(+), 51 deletions(-)
http://git.horde.org/horde-git/-/commit/1de3f9a2e018a959cdf22fce2a4e6814e9ddb310
State ⇒ Assigned
Taken from Jan Schneider
Taken from
getShare method. If we ask for a share, and can not find it, that is
indeed an error.
Looks like the Kronolith_Application#removeUserData method needs to be
tweaked though, as it is still assuming that the user's default share
is keyed by the username. This is no longer the case.
Assigned to Jan Schneider
Assigned to Michael Rubinsky
Taken from Michael Slusarz
not found [pid 30082 on line 179 of
"/usr/share/pear/Horde/Share/Sql.php"]
Don't know anything about that driver so I will leave to the other
devs to determine if this is the appropriate log level.
kronolith and mnemo. The error message says that the name of the
share is turba3@lnk.lt but in the database all share names are in a
form of such id: uJceVjxJBD9ON8OsLRTSc9A.
share system (I think).
user exist in _sharesng tables for nag, kronolith and mnemo. The error
message says that the name of the share is turba3@lnk.lt but in the
database all share names are in a form of such id:
uJceVjxJBD9ON8OsLRTSc9A.
2011-08-31T10:14:48+03:00 ERR: HORDE [horde] to be refactored [pid
30082 on line 943 of
"/var/www/html/horde/kronolith/lib/Driver/Sql.php"]
look at this.
non-existence is expected. I've toned down the logging level to
NOTICE to reflect this (should it be DEBUG?)
Bug #10241: Tone down error levels; do as much as possible beforethrowing exception
4 files changed, 33 insertions(+), 19 deletions(-)
http://git.horde.org/horde-git/-/commit/fdf9785c1cce154fc492de2dd22cec963825abaf
Bug #10241: Registry throws Horde_Exception, not Horde_Auth_Exceptions1 files changed, 2 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/0a90133cf28f0327818672b3883eb815fab1e446
"The following applications encountered errors removing user data:
kronolith, nag, mnemo"
1. Horde_Registry->removeUserData() /var/www/html/horde/admin/user.php:142
Logs say:
2011-08-31T10:14:48+03:00 ERR: HORDE [horde] to be refactored [pid
30082 on line 943 of "/var/www/html/horde/kronolith/lib/Driver/Sql.php"]
2011-08-31T10:14:48+03:00 ERR: HORDE [nag] Share name turba3@lnk.lt
not found [pid 30082 on line 179 of
"/usr/share/pear/Horde/Share/Sql.php"]
2011-08-31T10:14:48+03:00 ERR: HORDE [horde] Share name turba3@lnk.lt
not found [pid 30082 on line 180 of
"/usr/share/pear/Horde/Share/Sql.php"]
2011-08-31T10:14:48+03:00 ERR: HORDE [mnemo] Share name turba3@lnk.lt
not found [pid 30082 on line 179 of
"/usr/share/pear/Horde/Share/Sql.php"]
2011-08-31T10:14:48+03:00 ERR: HORDE [horde] Share name turba3@lnk.lt
not found [pid 30082 on line 180 of
"/usr/share/pear/Horde/Share/Sql.php"]
State ⇒ Feedback
Priority ⇒ 2. Medium
was in the API - not a standard Horde application method. These fixes
should take care of that problem (mnemo had the same issue). Also,
fixes moved permissions checking and preferences deletion into the
general Horde_Registry#removeUserData method.
Bug #10241: Remove user data fixes/refactor[mms] Revamp and fix Horde_Registry#removeUserData(); this method
should now be the sole access point to delete user data for any/all
apps.
6 files changed, 144 insertions(+), 114 deletions(-)
http://git.horde.org/horde-git/-/commit/f43e6149066bc3a7915ede64bf14e667a6a5ca4b
This may sound insane, but I have try to modify removeUserData in
horde/lib/Api.php without a success. Even things like print_r($prefs);
exit; doesn't work. Seems like it is never called?
Assigned to
State ⇒ Assigned
Turba/Kronolith stuff - that will need to be dealt with by another dev.
Bug #10241: Load all pref scopes before deleting them1 files changed, 4 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/fc99a631fc40123732e5349111bcf3eb375de2ed
Bug #10241: Fix passing $userId.Signed-off-by: Michael M Slusarz <slusarz@curecanti.org>
1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/94a98610dc77280cb2b987016bc6a4dfb22dd2d0
New Attachment: 0001-Fix-passing-userId.patch
patch for Registry.php however even with this fix there are problems
when deleting user data.
Firstly, none of the preferences from horde_prefs gets deleted for the user.
Secondly, Horde log shows:
2011-08-02T14:34:07+03:00 ERR: HORDE [turba] Removing user data is not
supported in the current address book storage driver. [pid 4769 on
line 2769 of "/var/www/html/horde/turba/lib/Driver.php"]
2011-08-02T14:34:07+03:00 ERR: HORDE [horde] There was an error
removing an address book for user@example.com [pid 4769 on line 414 of
"/var/www/html/horde/turba/lib/Application.php"]
2011-08-02T14:34:07+03:00 ERR: HORDE [horde] to be refactored [pid
4769 on line 943 of "/var/www/html/horde/kronolith/lib/Driver/Sql.php"]
2011-08-02T14:34:07+03:00 ERR: HORDE [nag] Share name user@example.com
not found [pid 4769 on line 179 of
"/usr/share/pear/Horde/Share/Sql.php"]
2011-08-02T14:34:07+03:00 ERR: HORDE [horde] Share name
user@example.com not found [pid 4769 on line 180 of
"/usr/share/pear/Horde/Share/Sql.php"]
Bug #10241: Fix removing user data from applications.2 files changed, 7 insertions(+), 7 deletions(-)
http://git.horde.org/horde-git/-/commit/ee2b27473a7fa9e5a69b94b7fa7814d7e4666588
Horde interface:
"The following applications encountered errors removing user data:
imp, ingo, turba, kronolith, nag, mnemo"
Horde log:
2011-06-14T23:38:59+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for imp. [pid 26452 on line
991 of "/usr/share/pear/Horde/Registry.php"]
2011-06-14T23:38:59+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for ingo. [pid 26452 on
line 991 of "/usr/share/pear/Horde/Registry.php"]
2011-06-14T23:38:59+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for turba. [pid 26452 on
line 991 of "/usr/share/pear/Horde/Registry.php"]
2011-06-14T23:38:59+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for kronolith. [pid 26452
on line 991 of "/usr/share/pear/Horde/Registry.php"]
2011-06-14T23:38:59+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for nag. [pid 26452 on line
991 of "/usr/share/pear/Horde/Registry.php"]
Bug #10241: Cast to array1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/ed92bcda64d65813162674f4ec602b533e0ab114
2011-06-14T22:38:03+03:00 WARN: HORDE [horde] PHP ERROR: array_keys()
expects parameter 1 to be array, object given [pid 3411 on line 151 of
"/usr/share/pear/Horde/Prefs.php"]
2011-06-14T22:38:03+03:00 WARN: HORDE [horde] PHP ERROR: Invalid
argument supplied for foreach() [pid 3411 on line 151 of
"/usr/share/pear/Horde/Prefs.php"]
2011-06-14T22:38:03+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for imp. [pid 3411 on line
991 of "/usr/share/pear/Horde/Registry.php"]
2011-06-14T22:38:03+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for ingo. [pid 3411 on line
991 of "/usr/share/pear/Horde/Registry.php"]
2011-06-14T22:38:03+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for turba. [pid 3411 on
line 991 of "/usr/share/pear/Horde/Registry.php"]
2011-06-14T22:38:03+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for kronolith. [pid 3411 on
line 991 of "/usr/share/pear/Horde/Registry.php"]
2011-06-14T22:38:03+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for nag. [pid 3411 on line
991 of "/usr/share/pear/Horde/Registry.php"]
State ⇒ Feedback
Assigned to Michael Slusarz
Bug #10241: Null argument to Horde_Prefs#remove() will remove all prefs.3 files changed, 58 insertions(+), 9 deletions(-)
http://git.horde.org/horde-git/-/commit/0563088d0c5fa20afdab68360602ec1fd3c8b7fa
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ removing user data doesn't work
Type ⇒ Bug
Queue ⇒ Horde Framework Packages
be deleted. Logs say:
2011-06-14T10:01:53+03:00 WARN: HORDE [horde] PHP ERROR: Missing
argument 1 for Horde_Prefs::remove(), called in
/var/www/html/horde/lib/Api.php on line 232 and defined [pid 25320 on
line 146 of "/usr/share/pear/Horde/Prefs.php"]
2011-06-14T10:01:53+03:00 NOTICE: HORDE [horde] PHP ERROR: Undefined
variable: pref [pid 25320 on line 148 of
"/usr/share/pear/Horde/Prefs.php"]
And after that:
2011-06-14T10:01:53+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for imp. [pid 25320 on line
991 of "/usr/share/pear/Horde/Registry.php"]
2011-06-14T10:01:53+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for ingo. [pid 25320 on
line 991 of "/usr/share/pear/Horde/Registry.php"]
2011-06-14T10:01:53+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for turba. [pid 25320 on
line 991 of "/usr/share/pear/Horde/Registry.php"]
2011-06-14T10:01:53+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for kronolith. [pid 25320
on line 991 of "/usr/share/pear/Horde/Registry.php"]
2011-06-14T10:01:53+03:00 ERR: HORDE [horde] The method
"removeUserData" is not defined in the API for nag. [pid 25320 on line
991 of "/usr/share/pear/Horde/Registry.php"]