Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
All The Tropes Wiki Project, Part XXI
RE: All The Tropes Wiki Project, Part XXI
(08-30-2021, 03:10 AM)LulzKiller Wrote: Not against adding translation features.

Who's Gani and why are they adding SQL code in blogposts?

Code:
<vote />
    +    
<!--start text-->
    +    
CREATE TABLE IF NOT EXISTS /*_*/Vote (
    +    
  -- Internal ID to identify between different vote tags on different pages
    +    
  vote_id int(11) NOT NULL PRIMARY KEY auto_increment,
    +    
  -- Key to actor_id for the person who voted
    +    
  vote_actor bigint unsigned NOT NULL,
    +    
  -- Username (if any) of the person who voted
    +    
  username varchar(255) NOT NULL default 0,
    +    
  -- User ID of the person who voted
    +    
  vote_user_id int(11) NOT NULL default 0,
    +    
  -- ID of the page where the vote tag is in
    +    
  vote_page_id int(11) NOT NULL default 0,
    +    
  -- Value of the vote (ranging from 1 to 5)
    +    
  vote_value char(1) character set latin1 collate latin1_bin NOT NULL default '',
    +    
  -- Timestamp when the vote was cast
    +    
  vote_date datetime NOT NULL default '1970-01-01 00:00:01',
    +    
  -- IP address of the user who voted
    +    
  vote_ip varchar(45) NOT NULL default ''
    +    
) /*$wgDBTableOptions*/;
    +    
    +    
CREATE INDEX vote_page_id_index ON /*_*/Vote (vote_page_id);
    +    
CREATE INDEX valueidx ON /*_*/Vote (vote_value);
    +    
CREATE INDEX actoridx ON /*_*/Vote (vote_actor);
    +    
CREATE INDEX usernameidx ON /*_*/Vote (username);
    +    
CREATE INDEX vote_date ON /*_*/Vote (vote_date);
    +    
    +    
    +    
<comments />
    +    
    +    
[[Category:Articles by user Gani]]
    +    
[[Category:30 August 2021]]
    +    
[[Category:Sql]]
    +    
__NOEDITSECTION__

I don't know, but that's pretty sus. SQL injection is generally not possible by default unless you allow it (certain extensions allow storage of SQL data), but it's not on topic for our wiki nor is it a good idea to add it without a good reason for security reasons. Rejected the edit. I'm banning the account on security grounds like Rob said, this is a dangerous precedent.


Messages In This Thread
RE: All The Tropes Wiki Project, Part XXI - by GethN7 - 08-30-2021, 07:07 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)