I'm using mediawiki on a site that employs three other web apps that require authentication. I'm trying to write a register script that will insert the desired authentication and profile data into all 3 apps' databases at the same time, so that users won't have to register 3 separate times. I've got it working on both of the other apps, but mediawiki says that the username doesn't exist when I can clearly see it in the table. I think it has something to do with my values of "" that I'm putting in the user_token and/or user_touched fields. I did this for testing purposes simply because I didn't know what was supposed to go there. What are these fields and what should I put there? Or is there something else I'm not aware of that could be causing this? user_touched looks like a date in the format YYYYMMDDHHSSMM. is that correct?
Erin
user_touched, I'd imagine, would be a Unix timestamp field. You ought to be able to generate this in PHP using time().
Rob Church
On 23/09/05, Erin Spiceland erin@spiceland.org wrote:
I'm using mediawiki on a site that employs three other web apps that require authentication. I'm trying to write a register script that will insert the desired authentication and profile data into all 3 apps' databases at the same time, so that users won't have to register 3 separate times. I've got it working on both of the other apps, but mediawiki says that the username doesn't exist when I can clearly see it in the table. I think it has something to do with my values of "" that I'm putting in the user_token and/or user_touched fields. I did this for testing purposes simply because I didn't know what was supposed to go there. What are these fields and what should I put there? Or is there something else I'm not aware of that could be causing this? user_touched looks like a date in the format YYYYMMDDHHSSMM. is that correct?
Erin
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Thanks for replying. Its not a Unix timestamp, it starts with 2005, not 112etc..., which is why I figured it was YYYYMMDDHHSSMM.
On Fri, 2005-09-23 at 20:23 +0100, Rob Church wrote:
user_touched, I'd imagine, would be a Unix timestamp field. You ought to be able to generate this in PHP using time().
Rob Church
On 23/09/05, Erin Spiceland erin@spiceland.org wrote:
I'm using mediawiki on a site that employs three other web apps that require authentication. I'm trying to write a register script that will insert the desired authentication and profile data into all 3 apps' databases at the same time, so that users won't have to register 3 separate times. I've got it working on both of the other apps, but mediawiki says that the username doesn't exist when I can clearly see it in the table. I think it has something to do with my values of "" that I'm putting in the user_token and/or user_touched fields. I did this for testing purposes simply because I didn't know what was supposed to go there. What are these fields and what should I put there? Or is there something else I'm not aware of that could be causing this? user_touched looks like a date in the format YYYYMMDDHHSSMM. is that correct?
Erin
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Ah, well, proprietary timestamp then. :)
Rob Church
On 23/09/05, Erin Spiceland erin@spiceland.org wrote:
Thanks for replying. Its not a Unix timestamp, it starts with 2005, not 112etc..., which is why I figured it was YYYYMMDDHHSSMM.
On Fri, 2005-09-23 at 20:23 +0100, Rob Church wrote:
user_touched, I'd imagine, would be a Unix timestamp field. You ought to be able to generate this in PHP using time().
Rob Church
On 23/09/05, Erin Spiceland erin@spiceland.org wrote:
I'm using mediawiki on a site that employs three other web apps that require authentication. I'm trying to write a register script that will insert the desired authentication and profile data into all 3 apps' databases at the same time, so that users won't have to register 3 separate times. I've got it working on both of the other apps, but mediawiki says that the username doesn't exist when I can clearly see it in the table. I think it has something to do with my values of "" that I'm putting in the user_token and/or user_touched fields. I did this for testing purposes simply because I didn't know what was supposed to go there. What are these fields and what should I put there? Or is there something else I'm not aware of that could be causing this? user_touched looks like a date in the format YYYYMMDDHHSSMM. is that correct?
Erin
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
I know I can duplicate that part, even if its just putting an arbitrary date in such as the time the user registered. I'm more concerned about user_token, because inserting a fake user_token (one I copied from another user's data) did not make mediawiki recognize the new username.
On Fri, 2005-09-23 at 22:20 +0100, Rob Church wrote:
Ah, well, proprietary timestamp then. :)
Rob Church
On 23/09/05, Erin Spiceland erin@spiceland.org wrote:
Thanks for replying. Its not a Unix timestamp, it starts with 2005, not 112etc..., which is why I figured it was YYYYMMDDHHSSMM.
On Fri, 2005-09-23 at 20:23 +0100, Rob Church wrote:
user_touched, I'd imagine, would be a Unix timestamp field. You ought to be able to generate this in PHP using time().
Rob Church
On 23/09/05, Erin Spiceland erin@spiceland.org wrote:
I'm using mediawiki on a site that employs three other web apps that require authentication. I'm trying to write a register script that will insert the desired authentication and profile data into all 3 apps' databases at the same time, so that users won't have to register 3 separate times. I've got it working on both of the other apps, but mediawiki says that the username doesn't exist when I can clearly see it in the table. I think it has something to do with my values of "" that I'm putting in the user_token and/or user_touched fields. I did this for testing purposes simply because I didn't know what was supposed to go there. What are these fields and what should I put there? Or is there something else I'm not aware of that could be causing this? user_touched looks like a date in the format YYYYMMDDHHSSMM. is that correct?
Erin
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Erin Spiceland wrote:
I'm using mediawiki on a site that employs three other web apps that require authentication. I'm trying to write a register script that will insert the desired authentication and profile data into all 3 apps' databases at the same time, so that users won't have to register 3 separate times. I've got it working on both of the other apps, but mediawiki says that the username doesn't exist when I can clearly see it in the table.
Can you provide some details of what, exactly, you're putting into the database and how?
I think it has something to do with my values of "" that I'm putting in the user_token and/or user_touched fields.
Unlikely; it should work fine with either blank.
-- This is a timestamp which is updated when a user -- logs in, logs out, changes preferences, or performs -- some other action requiring HTML cache invalidation -- to ensure that the UI is updated. user_touched char(14) binary NOT NULL default '',
-- A pseudorandomly generated value that is stored in -- a cookie when the "remember password" feature is -- used (previously, a hash of the password was used, but -- this was vulnerable to cookie-stealing attacks) user_token char(32) binary NOT NULL default '',
It's more likely that you've got a problem with an invalid name in the user_name field, or perhaps some weird bogus user_id. Note that the user_name field is stored with spaces, not underscores, and an initial letter must be capitalized.
I just successfully tested a minimal user addition on my 1.5 test installation (should be same on all prior release versions):
insert into user (user_name) values('Blargy'); update user set user_password=md5(concat(user_id,'-',md5('wonko'))) where user_name='Blargy';
-- brion vibber (brion @ pobox.com)
Brion,
Thanks so much! I do realize that the user_id field is autoincrement, so I'm not putting any value in there myself. I can see that it is set to the next value in the set. That looks fine. The user_name was not capitalized. When I did that, it recognizes the new user now (thanks so much!) but I can't log in. Does mediawiki add some string to the password before hashing it? or hash it twice or something?
Erin
On Fri, 2005-09-23 at 16:03 -0700, Brion Vibber wrote:
Erin Spiceland wrote:
I'm using mediawiki on a site that employs three other web apps that require authentication. I'm trying to write a register script that will insert the desired authentication and profile data into all 3 apps' databases at the same time, so that users won't have to register 3 separate times. I've got it working on both of the other apps, but mediawiki says that the username doesn't exist when I can clearly see it in the table.
Can you provide some details of what, exactly, you're putting into the database and how?
I think it has something to do with my values of "" that I'm putting in the user_token and/or user_touched fields.
Unlikely; it should work fine with either blank.
-- This is a timestamp which is updated when a user -- logs in, logs out, changes preferences, or performs -- some other action requiring HTML cache invalidation -- to ensure that the UI is updated. user_touched char(14) binary NOT NULL default '',
-- A pseudorandomly generated value that is stored in -- a cookie when the "remember password" feature is -- used (previously, a hash of the password was used, but -- this was vulnerable to cookie-stealing attacks) user_token char(32) binary NOT NULL default '',
It's more likely that you've got a problem with an invalid name in the user_name field, or perhaps some weird bogus user_id. Note that the user_name field is stored with spaces, not underscores, and an initial letter must be capitalized.
I just successfully tested a minimal user addition on my 1.5 test installation (should be same on all prior release versions):
insert into user (user_name) values('Blargy'); update user set user_password=md5(concat(user_id,'-',md5('wonko'))) where user_name='Blargy';
-- brion vibber (brion @ pobox.com) _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Erin Spiceland wrote:
The user_name was not capitalized. When I did that, it recognizes the new user now (thanks so much!) but I can't log in. Does mediawiki add some string to the password before hashing it? or hash it twice or something?
[snip]
update user set user_password=md5(concat(user_id,'-',md5('wonko'))) where user_name='Blargy';
You mean, like this? :)
-- brion vibber (brion @ pobox.com)
:D Thanks!
On Fri, 2005-09-23 at 16:31 -0700, Brion Vibber wrote:
Erin Spiceland wrote:
The user_name was not capitalized. When I did that, it recognizes the new user now (thanks so much!) but I can't log in. Does mediawiki add some string to the password before hashing it? or hash it twice or something?
[snip]
update user set user_password=md5(concat(user_id,'-',md5('wonko'))) where user_name='Blargy';
You mean, like this? :)
-- brion vibber (brion @ pobox.com) _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org