Page MenuHomePhabricator

Learn command doesn't handle argoutofrange properly
Closed, ResolvedPublic

Description

{noformat}
2016-02-04 19:37:08,524 [10] DEBUG Default.NetworkClient.Inbound [(null)] - :stwalkerster!stwalkerst@wikimedia/stwalkerster PRIVMSG Helpmebot :!learn

2016-02-04 19:37:08,525 [10] DEBUG Default.LegacyCommandParser [(null)] - Handling recieved message...

2016-02-04 19:37:08,525 [10] DEBUG Helpmebot.Legacy.Database.LegacyDatabase [(null)] - Executing (reader)query: SELECT user_accesslevel FROM user WHERE @nick LIKE user_nickname AND @user LIKE user_username AND @host LIKE user_hostname ORDER BY user_accesslevel ASC;

2016-02-04 19:37:08,526 [10] DEBUG Helpmebot.Legacy.Database.LegacyDatabase [(null)] - Done executing (reader)query: SELECT user_accesslevel FROM user WHERE @nick LIKE user_nickname AND @user LIKE user_username AND @host LIKE user_hostname ORDER BY user_accesslevel ASC;

2016-02-04 19:37:08,527 [10] INFO Default [(null)] - Running command: helpmebot6.Commands.Learn

2016-02-04 19:37:08,527 [10] DEBUG Helpmebot.Legacy.Database.LegacyDatabase [(null)] - Executing (reader)query: SELECT accesslevel FROM command WHERE typename = @command LIMIT 1;

2016-02-04 19:37:08,527 [10] DEBUG Helpmebot.Legacy.Database.LegacyDatabase [(null)] - Done executing (reader)query: SELECT accesslevel FROM command WHERE typename = @command LIMIT 1;

2016-02-04 19:37:08,528 [10] DEBUG Helpmebot.Legacy.Database.LegacyDatabase [(null)] - Executing (reader)query: SELECT accesslevel FROM command WHERE typename = @command LIMIT 1;

2016-02-04 19:37:08,528 [10] DEBUG Helpmebot.Legacy.Database.LegacyDatabase [(null)] - Done executing (reader)query: SELECT accesslevel FROM command WHERE typename = @command LIMIT 1;

2016-02-04 19:37:08,529 [10] DEBUG Helpmebot.Legacy.Database.LegacyDatabase [(null)] - Executing non-query: INSERT INTO accesslog (al_nuh, al_accesslevel, al_reqaccesslevel, al_class, al_allowed, al_channel, al_args) VALUES (@nuh, @accesslevel, @reqaccesslevel, @class, @allowed, @channel, @args);

2016-02-04 19:37:08,529 [10] DEBUG Helpmebot.Legacy.Database.LegacyDatabase [(null)] - Done executing query

2016-02-04 19:37:08,529 [10] INFO Default [(null)] - Starting command execution...

2016-02-04 19:37:08,699 [10] ERROR Default [(null)] - Argument is out of range.
Parameter name: index
System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index

at helpmebot6.Commands.Learn.ExecuteCommand () [0x00000] in <filename unknown>:0 
at helpmebot6.Commands.GenericCommand.ReallyRunCommand () [0x00000] in <filename unknown>:0

{noformat}

Created: Tue, 16 Feb 2016 19:12:37 GMT
Last Updated: Tue, 16 Feb 2016 20:17:35 GMT

Details

External Reference
HMB-170

Event Timeline

stwalkerster wrote at Tue, 16 Feb 2016 19:14:13 GMT:

Nor does accdeploy:
{noformat}
2016-02-08 23:16:00,595 [11] DEBUG Default.NetworkClient.Outbound [(null)] - PRIVMSG #wikipedia-en-accounts-devs :Deploying to the sandbox...

2016-02-08 23:16:00,600 [10] ERROR Default [(null)] - Array index is out of range.
System.IndexOutOfRangeException: Array index is out of range.

at helpmebot6.Commands.Accdeploy.ExecuteCommand () [0x00000] in <filename unknown>:0 
at helpmebot6.Commands.GenericCommand.ReallyRunCommand () [0x00000] in <filename unknown>:0

{noformat}

stwalkerster wrote at Tue, 16 Feb 2016 19:15:15 GMT:

Edit count is similar:

{noformat}
2016-02-11 20:53:28,122 [10] ERROR Default [(null)] - Value does not fall within the expected range.
System.ArgumentException: Value does not fall within the expected range.

at helpmebot6.Commands.Editcount.GetEditCount (System.String username, System.String channel) [0x00000] in <filename unknown>:0 
at helpmebot6.Commands.Userinfo.ExecuteCommand () [0x00000] in <filename unknown>:0 
at helpmebot6.Commands.GenericCommand.ReallyRunCommand () [0x00000] in <filename unknown>:0

{noformat}

jenkins wrote at Tue, 16 Feb 2016 20:17:35 GMT:

SUCCESS: Integrated in !https://jenkins.stwalkerster.co.uk/images/16x16/blue.png! [helpmebot-release #187|https://jenkins.stwalkerster.co.uk/job/helpmebot-release/187/]
HMB-170 fix (stwalkerster: [9b9c7fe2d91f4f16568dd48f85cb9c63b892c81f|https://github.com/helpmebot/helpmebot/commit/9b9c7fe2d91f4f16568dd48f85cb9c63b892c81f])

  • src/Helpmebot/Legacy/Commands/AccBot/AccDeploy.cs
  • src/Helpmebot/Legacy/Commands/Learn.cs
stwalkerster claimed this task.