[CWB] CQPweb: upgrade-database.php v3.0.16 > v3.1.0

Hardie, Andrew a.hardie at lancaster.ac.uk
Fri Jan 24 07:04:57 CET 2014


I have finally cracked # 2 in rev 518. Despite how long it took to track down, it turned out to be a stupid, stupid error. Sorry!!

Andrew.

From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Markus Killer
Sent: 22 January 2014 14:01
To: cwb at sslmit.unibo.it
Subject: Re: [CWB] CQPweb: upgrade-database.php v3.0.16 > v3.1.0

Hi Andrew,

(1) - MY MISTAKE

I completely understand your reason for disabling the deletion of the password column and the alert note is clearly visible.

I tried to replicate the 'password into email column' behaviour on a clean virtual machine and it didn't happen again. This must have been a misconfiguration in my original 3.0.16 database (i.e. password stored in password AND email column - probably an auto-form-fill slip in phpmyadmin). I'll try to verify this later with an archived sql-dump, as I have reset the system to an earlier state in the meantime.

My apologies, I really should have double-checked before filing this one.


(2) - BUG STILL PRESENT

@rev 515:

upgrade-database.php terminates without any warnings or errors, but password is still not hashed -> the value is NULL (see column 8 of  upgraded database below)

mysql> select * from cqpwdebug.user_info;
+----+----------+----------+----------------+----------------------+-------------+---------+----------+-------------+------------+-------------+----------------------+---------------------+---------------------+---------------+-------------------+------------+-------------------+--------------+---------------------------+----------------+-------------------+----------------+-----------+---------+------------+----------+
| id | username | password | realname       | email                | affiliation | country | passhash | acct_status | verify_key | expiry_time | password_expiry_time | last_seen_time      | acct_create_time    | conc_kwicview | conc_corpus_order | cqp_syntax | context_with_tags | use_tooltips | thin_default_reproducible | coll_statistic | coll_freqtogether | coll_freqalone | coll_from | coll_to | max_dbsize | linefeed |
+----+----------+----------+----------------+----------------------+-------------+---------+----------+-------------+------------+-------------+----------------------+---------------------+---------------------+---------------+-------------------+------------+-------------------+--------------+---------------------------+----------------+-------------------+----------------+-----------+---------+------------+----------+
|  1 | mkiller  | debugpass     | unknown person | markus.killer at uzh.ch<mailto:markus.killer at uzh.ch> | NULL        | 00      | NULL     |           1 | NULL       |           0 |                    0 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 |             1 |                 1 |          0 |                 0 |            1 |                         1 |              6 |                 5 |              5 |        -3 |       3 |    1000000 | au       |
+----+----------+----------+----------------+----------------------+-------------+---------+----------+-------------+------------+-------------+----------------------+---------------------+---------------------+---------------+-------------------+------------+-------------------+--------------+---------------------------+----------------+-------------------+----------------+-----------+---------+------------+----------+
1 row in set (0.00 sec)

When trying to login to the upgraded system, I get this message:

Your login was not successful.


The credentials you entered are not valid.



Please go back to the log on page and try again.


Best wishes,
Markus


> From: a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>
> To: cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>
> Date: Wed, 22 Jan 2014 12:04:36 +0000
> Subject: Re: [CWB] CQPweb: upgrade-database.php v3.0.16 > v3.1.0
>
> Hi Markus,
>
> I have been puzzling over this at great length and have got nowhere.
>
> (1) The old password column exists because I disabled its deletion to make rollback easier if needed. (There is an alert note in the printed output telling people to drop the password column manually after the fact).
>
> But the old password going into the email column is something I just can't figure out. It's not happened on the system I upgraded (albeit that wasn't with 512 but an earlier version) and I can't find anything in the code of upgrade-database that ought to alter the contents of the email column in that way.
>
> (2) Likewise this puzzles me, there WAS a bug that did this, but I thought I had fixed it in commit 502.
>
> So, if you can add any further details related to this bug that might help me track it down, that would be very much appreciated....
>
> best
>
> Andrew.
>
> -----Original Message-----
> From: cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Markus Killer
> Sent: 21 January 2014 13:10
> To: Open source development of the Corpus WorkBench
> Subject: Re: [CWB] CQPweb: upgrade-database.php v3.0.16 > v3.1.0
>
> upgrade-database.php rev512 runs smoothly now, but there seem to be two more issues:
>
> (1) - the old password is mapped into table:user_info column:password and accidentally, I think, into column:email as well
>
> (2) - the password is not hashed (passhash: NULL) and, consequently, authentication fails.
>
> --> not possible to login as superuser after running upgrade-database.php (unless you manually add passhash)
>
>
> ----------------------------------------
> > From: a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>
> > To: m.killer at outlook.com<mailto:m.killer at outlook.com>; cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>
> > Date: Tue, 21 Jan 2014 12:50:34 +0000
> > Subject: Re: [CWB] CQPweb: upgrade-database.php v3.0.16> v3.1.0
> >
> > Think I've squished that one in 512.
> >
> > Andrew.
> >
> > -----Original Message-----
> > From: cwb-bounces at sslmit.unibo.it<mailto:cwb-bounces at sslmit.unibo.it> [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Markus Killer
> > Sent: 21 January 2014 10:48
> > To: Open source development of the Corpus WorkBench
> > Subject: [CWB] CQPweb: upgrade-database.php v3.0.16> v3.1.0
> >
> > upgrade-database on exact copy of working v3.0.16 db:
> >
> > Revision 510.
> > mki at ubuntu:/var/www/cqp-web-beta/bin$ sudo php upgrade-database.php Database version is now at < 3.1.0. Database will now be upgraded to 3.1.0...
> > A mySQL query did not run successfully!
> >
> > Original query:
> >
> > alter table system_messages alter column fromto set default NULL
> >
> > Error # 1067: Invalid default value for 'fromto'
> >
> > **************
> > DESCRIBE - BEFORE SCRIPT:
> >
> > mysql> describe cqpwbeta.system_messages;
> > +------------+--------------+------+-----+-------------------+-----------------------------+
> > | Field | Type | Null | Key | Default | Extra |
> > +------------+--------------+------+-----+-------------------+-----------------------------+
> > | message_id | varchar(150) | NO | PRI | NULL | | timestamp | timestamp
> > | | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | header |
> > | varchar(150) | NO | | | | content | text | NO | | NULL | | fromto |
> > | varchar(150) | NO | | | |
> > +------------+--------------+------+-----+-------------------+-----------------------------+
> > 5 rows in set (0.00 sec)
> >
> >
> >
> > ----------------------------------------
> >> From: a.hardie at lancaster.ac.uk<mailto:a.hardie at lancaster.ac.uk>
> >> To: cwb at sslmit.unibo.it<mailto:cwb at sslmit.unibo.it>; m.killer at outlook.com<mailto:m.killer at outlook.com>
> >> Date: Tue, 21 Jan 2014 10:17:22 +0000
> >> Subject: Re: [CWB] CQPweb: v 3.1.0 now usable, I think
> >>
> >> (For the benfit of the peanut gallery: Markus sent me the "describe.... off list, and it had this line:
> >>
> >> | dbname | varchar(200) | NO | PRI | NULL | |
> >>
> >> )
> >>
> >> So again, it's a case of rollback being needed so the script can run again.
> >>
> >> The next bug is a phasing issue, it looks as if some of the DB changes which I put in there for 3.0.16 are not in the right place, they should have been assigned to 3.0.15. Commit 510 has all of those that I can find fixed.
> >>
> >> best
> >>
> >> Andrew.
> > _______________________________________________
> > CWB mailing list
> > CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
> > http://devel.sslmit.unibo.it/mailman/listinfo/cwb
> > _______________________________________________
> > CWB mailing list
> > CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
> > http://devel.sslmit.unibo.it/mailman/listinfo/cwb
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
> http://devel.sslmit.unibo.it/mailman/listinfo/cwb
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
> http://devel.sslmit.unibo.it/mailman/listinfo/cwb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://devel.sslmit.unibo.it/pipermail/cwb/attachments/20140124/ad158402/attachment-0001.html>


More information about the CWB mailing list