https://bugzilla.wikimedia.org/show_bug.cgi?id=63996

            Bug ID: 63996
           Summary: Block::parseTarget() returns wrong type
           Product: MediaWiki
           Version: 1.22.5
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: User login and signup
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
       Web browser: ---
   Mobile Platform: ---

When an IP address is pased to the function Block::parseTarget(), it creates a
new user from it. However, it returns the wrong type Block::TYPE_IP instead of
the correct Block::TYPE_USER.

The consequence of this behaviour is that the caller function Block::newLoad()
tries to convert the returned value from IP to hex with the IP::toHex()
function. This leads to a wrong value returned by getRangeCond(), which then
results in a database problem:

2014-04-16 12:46:47 CEST ERROR:  operator does not exist: text <= integer at
character 379
2014-04-16 12:46:47 CEST HINT:  No operator matches the given name and argument
type(s). You might need to add explicit type casts.
2014-04-16 12:46:47 CEST STATEMENT:  SELECT /* Block::newLoad xxx.yyy.zzz.iii
*/ 
ipb_id,ipb_address,ipb_by,ipb_by_text,ipb_reason,ipb_timestamp,ipb_auto,ipb_anon_only,ipb_create_account,ipb_enable_autoblock,ipb_expiry,ipb_deleted,ipb_block_email,ipb_allow_usertalk,ipb_parent_block_id
 FROM "ipblocks"   WHERE ipb_address IN ('xxx.yyy.zzz.iii','MyUsername')  OR
((ipb_range_start  LIKE '%' ) AND (ipb_range_start <= 0) AND (ipb_range_end >=
0))

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to