Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#14516 closed defect (bug) (duplicate)

Must stripslash input fields for db install

Reported by: johanee's profile johanee Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0.1
Component: Upgrade/Install Keywords: has-patch
Focuses: Cc:

Description

During WordPress database install we must stripslash the input fields.

For database name, database username and database password \, ', and " are valid characters. For dbhost "strange" characters probably aren't valid, but we should handle it correctly anyway.

For prefix there is no need to stripslash as we immediately make sure it only contains letters, numbers and underscores. (mysql allows other characters, but it is probably wise to limit it anyway).

Attachments (2)

stripslashes-db-values-on-install.patch (661 bytes) - added by johanee 14 years ago.
Stripslash input during db install
stripslashes-db-values-on-install-2.patch (1.7 KB) - added by johanee 14 years ago.
Stripslash input during db install and addslashes when saving config

Download all attachments as: .zip

Change History (10)

@johanee
14 years ago

Stripslash input during db install

#1 @johanee
14 years ago

  • Cc johan.eenfeldt@… added

Please wait.

Obviously we must then addslashes() when saving to wp-config.php. Updating and actually testing patch!

@johanee
14 years ago

Stripslash input during db install and addslashes when saving config

#2 @nacin
14 years ago

  • Milestone changed from Awaiting Review to 3.1

#3 @nacin
14 years ago

Related, potentially for 3.1 as well: #14516

#4 follow-up: @johanee
14 years ago

This is #14516 did you mean #13655 ?

#5 in reply to: ↑ 4 @nacin
14 years ago

Replying to johanee:

This is #14516 did you mean #13655 ?

Yep, thanks.

#6 @johanee
14 years ago

  • Keywords has-patch added

#7 @ryan
14 years ago

  • Milestone changed from 3.1 to Future Release

#8 @SergeyBiryukov
13 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.