Database: Increase the size of `wp_posts.post_password` to 255 characters.

Longer passwords and passphrases are much more common than when post passwords were introduced all those eons ago, so let's increase the length of the `post_password` field from 20 to 255 characters.

The password will continue to be stored in plaintext, as the ability for the post author to view the password is a commonly used feature.

Trivia: this was the last 3 digit Trac ticket to be closed.

Props skippy, nazgul, iandunn, adamsilverstein, pento.
Fixes #881.



git-svn-id: https://develop.svn.wordpress.org/trunk@38590 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2016-09-12 02:27:55 +00:00
parent 0998de889d
commit f54b5428c4
3 changed files with 3 additions and 3 deletions

View File

@ -157,7 +157,7 @@ echo esc_html( $visibility_trans ); ?></span>
<span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> /> <label for="sticky" class="selectit"><?php _e( 'Stick this post to the front page' ); ?></label><br /></span> <span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> /> <label for="sticky" class="selectit"><?php _e( 'Stick this post to the front page' ); ?></label><br /></span>
<?php endif; ?> <?php endif; ?>
<input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e('Password protected'); ?></label><br /> <input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e('Password protected'); ?></label><br />
<span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo esc_attr($post->post_password); ?>" maxlength="20" /><br /></span> <span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo esc_attr($post->post_password); ?>" maxlength="255" /><br /></span>
<input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br /> <input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br />
<p> <p>

View File

@ -165,7 +165,7 @@ CREATE TABLE $wpdb->posts (
post_status varchar(20) NOT NULL default 'publish', post_status varchar(20) NOT NULL default 'publish',
comment_status varchar(20) NOT NULL default 'open', comment_status varchar(20) NOT NULL default 'open',
ping_status varchar(20) NOT NULL default 'open', ping_status varchar(20) NOT NULL default 'open',
post_password varchar(20) NOT NULL default '', post_password varchar(255) NOT NULL default '',
post_name varchar(200) NOT NULL default '', post_name varchar(200) NOT NULL default '',
to_ping text NOT NULL, to_ping text NOT NULL,
pinged text NOT NULL, pinged text NOT NULL,

View File

@ -11,7 +11,7 @@ $wp_version = '4.7-alpha-38178-src';
* *
* @global int $wp_db_version * @global int $wp_db_version
*/ */
$wp_db_version = 37965; $wp_db_version = 38590;
/** /**
* Holds the TinyMCE version * Holds the TinyMCE version