Opened on 07/14/2015 at 02:17:29 PM

Closed on 08/11/2015 at 01:28:56 PM

#2783 closed change (fixed)

Establish cron-job to clean up Trac fake accounts

Reported by: matze Assignee: matze
Priority: P2 Milestone:
Module: Infrastructure Keywords:
Cc: fred, trev Blocked By: #2586, #2849
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29323184

Description (last modified by matze)

In order to continuously clean out fake account records from Trac (see #2586), the following SQL query should become executed daily:

DELETE
    session,
    session_attribute
FROM
    session
JOIN
    session_attribute AS session_check ON
    session.sid = session_check.sid AND
    session.authenticated = session_check.authenticated
JOIN
    session_attribute ON
    session.sid = session_attribute.sid AND
    session.authenticated = session_attribute.authenticated
WHERE
    session_check.name = "email_verification_token" AND
    session.last_visit < UNIX_TIMESTAMP(NOW() - INTERVAL 5 DAY)
;

Attachments (0)

Change History (8)

comment:1 Changed on 07/14/2015 at 02:19:52 PM by matze

  • Cc fred added; fhd trev removed

comment:2 Changed on 07/15/2015 at 08:36:40 PM by trev

  • Cc trev added

This query looks like it would remove every account that wasn't touched for five days. Do I understand correctly that session_check.name = "email_verification_token" applies only to accounts where email validation didn't succeed?

comment:3 Changed on 07/16/2015 at 12:15:42 AM by matze

  • Description modified (diff)

Yep.

comment:4 Changed on 07/16/2015 at 12:17:14 AM by matze

  • Description modified (diff)

comment:5 Changed on 08/03/2015 at 11:55:06 AM by matze

  • Blocked By 2849 added

comment:6 Changed on 08/03/2015 at 02:18:08 PM by matze

  • Owner set to matze

comment:7 Changed on 08/03/2015 at 02:20:26 PM by matze

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:8 Changed on 08/11/2015 at 01:28:56 PM by matze

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from matze.
 
Note: See TracTickets for help on using tickets.