Closed
Bug 1255177
Opened 9 years ago
Closed 9 years ago
Twitter account not getting deleted from the accounts list
Categories
(Chat Core :: Twitter, defect)
Tracking
(thunderbird46 unaffected, thunderbird47 fixed, thunderbird48 fixed)
RESOLVED
FIXED
Instantbird 48
Tracking | Status | |
---|---|---|
thunderbird46 | --- | unaffected |
thunderbird47 | --- | fixed |
thunderbird48 | --- | fixed |
People
(Reporter: sourab.reddy2k14, Assigned: sourab.reddy2k14, Mentored)
References
Details
(Keywords: regression, Whiteboard: [1.6-blocking])
Attachments
(2 files, 5 obsolete files)
(deleted),
image/png
|
Details | |
(deleted),
patch
|
aleth
:
review+
jorgk-bmo
:
approval-comm-aurora+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/48.0.2564.116 Chrome/48.0.2564.116 Safari/537.36
Steps to reproduce:
On an ubuntu 14.04 machine , I added my twitter account, the API authentication failed due to internet failure, then I tried to delete my account from the list by selecting the account and clicking on delete .
Actual results:
The account did not get deleted from the list.
Expected results:
The account should have got deleted from the list .
Assignee | ||
Updated•9 years ago
|
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Updated•9 years ago
|
Component: Account manager → Twitter
OS: Linux → All
Product: Instantbird → Chat Core
Hardware: x86_64 → All
Version: 1.6 → 48
Assignee | ||
Updated•9 years ago
|
Mentor: clokep
Component: Twitter → Account manager
OS: All → Linux
Product: Chat Core → Instantbird
Hardware: All → x86_64
Version: 48 → 1.6
Comment 1•9 years ago
|
||
Moving to the right component.
Status: UNCONFIRMED → NEW
Component: Account manager → Twitter
Ever confirmed: true
OS: Linux → All
Product: Instantbird → Chat Core
Hardware: x86_64 → All
Version: 1.6 → 48
Assignee | ||
Comment 2•9 years ago
|
||
The nsICookieManager::remove method uses 5 arguments for removing the cookie instead of 4 arguments in previous version .
Attachment #8728619 -
Flags: review?(clokep)
Comment 3•9 years ago
|
||
Comment on attachment 8728619 [details] [diff] [review]
the code in " twitter.js " file , located in /chat/protocols/twitter had used less arguments for Session.cookies.remove method , which is used to delete cookies when deleting an account , causing t
Review of attachment 8728619 [details] [diff] [review]:
-----------------------------------------------------------------
::: chat/protocols/twitter/twitter.js
@@ +893,5 @@
> // during the same session (bug 954308).
> let cookies = Services.cookies.getCookiesFromHost("twitter.com");
> while (cookies.hasMoreElements()) {
> let cookie = cookies.getNext().QueryInterface(Ci.nsICookie2);
> + Services.cookies.remove(cookie.host, cookie.name, cookie.path,cookie.originAttributes, false);
Thought I'd do a drive by review!
nit: Please add a space after the comma. Even better: this line is now quite long, could you break it up? eg:
Services.cookies.remove(cookie.host, cookie.name, cookie.path,
cookie.originAttributes, false);
Please refer to https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style for our coding style guidelines.
Attachment #8728619 -
Flags: feedback+
Updated•9 years ago
|
Attachment #8728619 -
Flags: review?(clokep)
Updated•9 years ago
|
Assignee: nobody → sourab.reddy2k14
Status: NEW → ASSIGNED
Updated•9 years ago
|
Blocks: 1245184
Summary: twitter account not getting deleted from the accounts list → Twitter account not getting deleted from the accounts list
Assignee | ||
Comment 4•9 years ago
|
||
I have edited the mdn docs related to nsICookieManager::remove method , which is used to remove cookies . The twitter account was not getting deleted as to delete account we need to delete cookies and to delete cookies the nsICookieManager::remove was being called with fewer arguments than required. A new jsVal relating to cookie origins was added in the nsICookieManager::remove method , so this was a problem occuring due to code regression.
Attachment #8728619 -
Attachment is obsolete: true
Attachment #8729980 -
Flags: review?(aleth)
Attachment #8729980 -
Flags: feedback?(nhnt11)
Updated•9 years ago
|
Keywords: regression
Version: 48 → 47
Comment 5•9 years ago
|
||
Comment on attachment 8729980 [details] [diff] [review]
Deleting account , requires deleting the cookies. The method nsICookieManager::remove() is called to remove cookies. In twitter.js the method was called with fewer arguments ( 4 instead of 5 )
Review of attachment 8729980 [details] [diff] [review]:
-----------------------------------------------------------------
Code looks good!
Please follow the instructions [1] on how to prepare a patch with the correct header and formatting for checkin. (Basically, run mach mercurial-setup, check your hg config, add a commit message in the right format and then use hg export or hg bzexport to submit the patch.)
[1] https://developer.mozilla.org/en-US/docs/Mercurial/Using_Mercurial#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
::: chat/protocols/twitter/twitter.js
@@ +893,5 @@
> // during the same session (bug 954308).
> let cookies = Services.cookies.getCookiesFromHost("twitter.com");
> while (cookies.hasMoreElements()) {
> let cookie = cookies.getNext().QueryInterface(Ci.nsICookie2);
> + Services.cookies.remove(cookie.host, cookie.name, cookie.path,
Nit: Please avoid adding trailing whitespace. (Most editors have a setting you can turn on that will automatically avoid this.)
Attachment #8729980 -
Flags: review?(aleth)
Attachment #8729980 -
Flags: review-
Attachment #8729980 -
Flags: feedback?(nhnt11)
Assignee | ||
Comment 6•9 years ago
|
||
I have edited the mdn docs related to nsICookieManager::remove method , which is used to remove cookies . The twitter account was not getting deleted as to delete account we need to delete cookies and to delete cookies the nsICookieManager::remove was being called with fewer arguments than required. A new jsVal relating to cookie origins was added in the nsICookieManager::remove method , so this was a problem occuring due to code regression.
Attachment #8729980 -
Attachment is obsolete: true
Attachment #8729986 -
Flags: review?(aleth)
Comment 7•9 years ago
|
||
Comment on attachment 8729986 [details] [diff] [review]
Deleting account , requires deleting the cookies. The method nsICookieManager::remove() is called to remove cookies. In twitter.js the method was called with fewer arguments ( 4 instead of 5 )
Review of attachment 8729986 [details] [diff] [review]:
-----------------------------------------------------------------
Your commit message
Bug 1255177- Modified Services.cookies.remove() to use appropriate arguments
isn't right - you didn't modify the remove function. It would be more precise e.g. like this:
Bug 1255177 - Add originAttributes argument to Services.cookies.remove calls in chat/.
Attachment #8729986 -
Flags: review?(aleth) → review+
Assignee | ||
Comment 8•9 years ago
|
||
I have edited the mdn docs related to nsICookieManager::remove method , which is used to remove cookies . The twitter account was not getting deleted as to delete account we need to delete cookies and to delete cookies the nsICookieManager::remove was being called with fewer arguments than required. A new jsVal relating to cookie origins was added in the nsICookieManager::remove method , so this was a problem occuring due to code regression.
Attachment #8729986 -
Attachment is obsolete: true
Attachment #8729987 -
Flags: review?(aleth)
Assignee | ||
Comment 9•9 years ago
|
||
I have edited the mdn docs related to nsICookieManager::remove method , which is used to remove cookies . The twitter account was not getting deleted as to delete account we need to delete cookies and to delete cookies the nsICookieManager::remove was being called with fewer arguments than required. A new jsVal relating to cookie origins was added in the nsICookieManager::remove method , so this was a problem occuring due to code regression.
Attachment #8729987 -
Attachment is obsolete: true
Attachment #8729987 -
Flags: review?(aleth)
Attachment #8729988 -
Flags: review?(aleth)
Assignee | ||
Comment 10•9 years ago
|
||
modified the commit message to be more appropriate.
Comment 11•9 years ago
|
||
Comment on attachment 8729988 [details] [diff] [review]
Deleting account , requires deleting the cookies. The method nsICookieManager::remove() is called to remove cookies. In twitter.js the method was called with fewer arguments ( 4 instead of 5 )
Review of attachment 8729988 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
Attachment #8729988 -
Flags: review?(aleth) → review+
Updated•9 years ago
|
Keywords: checkin-needed
Comment 12•9 years ago
|
||
This patch does not apply on the current c-c tip (abort: bad hunk #1 @@ -889,18 +889,17 @@ Account.prototype = {).
Please check and attach a rebased patch!
Keywords: checkin-needed
Updated•9 years ago
|
Whiteboard: [1.6-blocking]
Assignee | ||
Comment 13•9 years ago
|
||
ok will do that ASAP and submit a new patch.
Comment 14•9 years ago
|
||
https://hg.mozilla.org/comm-central/rev/330bcc2089a8007bfde3313475dc7ce1b313a3ef
Bug 1255177 - Add originAttributes argument to Services.cookies.remove calls in chat/. r=aleth
Comment 15•9 years ago
|
||
Fixed the broken patch file. Did you edit it by hand? Always a bad idea ;)
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Instantbird 48
Comment 16•9 years ago
|
||
We should uplift this to 47, which is when the blocker landed.
Comment 17•9 years ago
|
||
Comment on attachment 8729988 [details] [diff] [review]
Deleting account , requires deleting the cookies. The method nsICookieManager::remove() is called to remove cookies. In twitter.js the method was called with fewer arguments ( 4 instead of 5 )
[Approval Request Comment]
Regression caused by (bug #): 1245184
User impact if declined: see bug title
Risk to taking this patch (and alternatives if risky): can't get more broken than it is.
Attachment #8729988 -
Flags: approval-comm-aurora?
Comment 18•9 years ago
|
||
Fixed patch file, as landed.
Updated•9 years ago
|
Assignee: sourab.reddy2k14 → aleth
Updated•9 years ago
|
Assignee: aleth → sourab.reddy2k14
Updated•9 years ago
|
Attachment #8729988 -
Attachment is obsolete: true
Attachment #8729988 -
Flags: approval-comm-aurora?
Updated•9 years ago
|
Attachment #8735989 -
Flags: review+
Attachment #8735989 -
Flags: approval-comm-aurora?
Assignee | ||
Comment 19•9 years ago
|
||
It was my first patch, and there were other unnecessary files which were coming in the patch, so I had edited it by hand (a very bad practice, sorry ). I was trying to make a fresh patch, but my build had broken ( now it is fixed ). Thanks for fixing my patch.
Also I ran a simple search for "cookies.remove" on dxr in c-c, pointing out many such files involving obsolete usage for this same method. Shouldn't we fix them also ?
Comment 20•9 years ago
|
||
(In reply to sourab.reddy2k14 from comment #19)
> Also I ran a simple search for "cookies.remove" on dxr in c-c, pointing out
> many such files involving obsolete usage for this same method. Shouldn't we
> fix them also ?
Well spotted. Yes you are right, and that's already being done in bug 1256153 and bug 1251368.
Updated•9 years ago
|
Attachment #8735989 -
Flags: approval-comm-aurora? → approval-comm-aurora+
Comment 21•9 years ago
|
||
Aurora (TB 47):
https://hg.mozilla.org/releases/comm-aurora/rev/05bc4f17ba6e
status-thunderbird46:
--- → unaffected
status-thunderbird47:
--- → fixed
status-thunderbird48:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•