Commit Graph

322 Commits

Author SHA1 Message Date
Mark Jaquith a6baa90a3d Set `autocomplete="off"` on the password reset form itself, in addition to the individual inputs, to work around a Chrome bug.
fixes #24364. props azaozz.

git-svn-id: https://develop.svn.wordpress.org/trunk@24553 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-03 21:29:53 +00:00
Andrew Nacin 43dcd6d9f4 Validate post password hash.
git-svn-id: https://develop.svn.wordpress.org/trunk@24466 602fd350-edb4-49c9-b593-d223f7449a82
2013-06-21 03:00:26 +00:00
Andrew Nacin 865defcb1a Revert [24291] pending further discussion and sleuthing. see #24364.
git-svn-id: https://develop.svn.wordpress.org/trunk@24317 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-22 18:37:43 +00:00
Andrew Ozz ea91e4bcab Fix Chrome disregarding autocomplete="off" for password fields. Add autocomplete="off" to forms where the users can choose new password. Fixes #24364.
git-svn-id: https://develop.svn.wordpress.org/trunk@24291 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-18 22:56:21 +00:00
Andrew Ozz db72372fcc Logged out warnings:
- Don't use <base> tag to set target="_blank". It can break form submission. Instead, set target only on links with JS.
- Fix same domain comparison in wp_auth_check_html() when FORCE_SSL_LOGIN == true.
- Properly show/hide the "Close" button when the dialog is shown multiple times.
See #23295

git-svn-id: https://develop.svn.wordpress.org/trunk@24208 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-08 22:45:58 +00:00
Sergey Biryukov bb2a27be5b Use ellipsis instead of three dots. props tjsingleton, jordie23, wojtek.szkutnik, DrewAPicture, SergeyBiryukov. see #8714.
git-svn-id: https://develop.svn.wordpress.org/trunk@24207 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-08 21:27:31 +00:00
Andrew Ozz 9a9d5861cf Logged out warnings:
- Don't remove login error messages coming from wp_signon().
- When the login form is shown in iframe, open all links in a new tab/window.
- Add filter for the login form error message.
See #23295

git-svn-id: https://develop.svn.wordpress.org/trunk@24179 602fd350-edb4-49c9-b593-d223f7449a82
2013-05-06 21:35:50 +00:00
Andrew Nacin a10e14ba57 Add wp_registration_url() and register_url filter.
props scribu, JustinSainton, SergeyBiryukov.
fixes #17950.



git-svn-id: https://develop.svn.wordpress.org/trunk@24053 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-22 20:21:22 +00:00
Andrew Ozz 45f54b41d8 Logged out warnings: add fallback text dialog for:
- The login page has "X-Frame-Options: DENY" header.
- Cross-domain when displaying on the front-end on multisite with domain mapping.
- The site forces ssl login but not ssl admin.

Add onbeforeunload prompt to counter (frame-busting) JS redirects. Move the JS and CSS into separate files. See #23295.

git-svn-id: https://develop.svn.wordpress.org/trunk@23805 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-27 08:43:11 +00:00
Andrew Ozz b653d65c1c Logged out warnings: clear previous errors when interim_login is set, see #23295
git-svn-id: https://develop.svn.wordpress.org/trunk@23691 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-13 23:32:52 +00:00
Andrew Ozz 4ad27d6d14 Autosave to the browser's sessionStorage, compare this autosave to the post content on page load and let the user restore it when the data is not the same. First run, see #23220
git-svn-id: https://develop.svn.wordpress.org/trunk@23683 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-13 10:08:16 +00:00
Mark Jaquith 89da4c1451 Unhyphenate "log-in". see #23295
git-svn-id: https://develop.svn.wordpress.org/trunk@23625 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-06 20:06:19 +00:00
Ryan Boren 6d2a8d2ef0 Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
see #21767


git-svn-id: https://develop.svn.wordpress.org/trunk@23594 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-03 21:11:40 +00:00
Sergey Biryukov 93aa28e208 Consistently apply 'register' filter. props wonderboymusic for initial patch. fixes #14406.
git-svn-id: https://develop.svn.wordpress.org/trunk@23558 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 16:43:18 +00:00
Ryan Boren c363aea627 Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
git-svn-id: https://develop.svn.wordpress.org/trunk@23554 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 16:28:40 +00:00
Andrew Ozz 780ee565aa Improved logged out warnings, first run, props mintindeed, see #23295
git-svn-id: https://develop.svn.wordpress.org/trunk@23504 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 08:57:17 +00:00
Ryan Boren a6c8efadb9 Change all core API to expect unslashed rather than slashed arguments.
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.

Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.

Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.

Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.

Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.

Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.

Plugins should use wp_unslash() on data being passed to core API.

Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.

Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.

Remove many no longer necessary calls to $wpdb->escape() and esc_sql().

In wp_get_referer() and wp_get_original_referer(), return unslashed data.

Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.

Switch several queries over to prepare().

Expect something to break.

Props alexkingorg
see #21767


git-svn-id: https://develop.svn.wordpress.org/trunk@23416 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-14 22:51:06 +00:00
Sergey Biryukov b0e067cd0a Simplify the logic for printing "Lost your password?" link. props ktdreyer. fixes #16498.
git-svn-id: https://develop.svn.wordpress.org/trunk@23336 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-23 02:08:44 +00:00
Ryan Boren c53137f535 Scope button classes so they can be used on the frontend without interfering with theme styles.
Props helenyhou, koopersmith
fixes #22644


git-svn-id: https://develop.svn.wordpress.org/trunk@22948 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 13:40:59 +00:00
Andrew Nacin aeabe30d20 Revert type="email" on the registration form to avoid validation issues. see #22183.
git-svn-id: https://develop.svn.wordpress.org/trunk@22413 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 07:47:52 +00:00
Andrew Ozz 108c09fdd3 Buttons: slightly bolder :focus styles, make the "Log In" button '.button-large', props lessbloat, see #21598
git-svn-id: https://develop.svn.wordpress.org/trunk@22288 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-24 01:27:56 +00:00
Ryan Boren 8d5ca186c2 Consolidate some strings. Props pavelevap, SergeyBiryukov. see #21728
git-svn-id: https://develop.svn.wordpress.org/trunk@22124 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-05 19:04:34 +00:00
Andrew Nacin 9d9eb25e2a Add a login_body_class filter to login_header(). fixes #21133.
git-svn-id: https://develop.svn.wordpress.org/trunk@22000 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-25 09:13:06 +00:00
Andrew Nacin 774a12be83 Introduce constants to allow for easier expression of time periods in seconds. Adds MINUTE_IN_SECONDS, HOUR_IN_SECONDS, DAY_IN_SECONDS, WEEK_IN_SECONDS, YEAR_IN_SECONDS. props nbachiyski, SergeyBiryukov. fixes #20987.
git-svn-id: https://develop.svn.wordpress.org/trunk@21996 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-25 05:26:19 +00:00
Peter Westwood 588886c634 Passwords: Make it possible for plugins to enforce extra password strength / validity rules during the reset process.
Adds a filter in the password reset process so that a plugin can enforce particular password rules on users to compliment the existing filtering in the Profile modification process.
Fixes #21778.


git-svn-id: https://develop.svn.wordpress.org/trunk@21923 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-20 11:01:29 +00:00
Andrew Nacin ee88036c08 Use network_site_url() for wp-signup.php. props markjaquith. see #19796.
git-svn-id: https://develop.svn.wordpress.org/trunk@21813 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 12:27:25 +00:00
Ryan Boren 92ea34f6a2 Use set_url_scheme(). Props johnbillion, MarcusPope. see #19037 #20759
git-svn-id: https://develop.svn.wordpress.org/trunk@21664 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-30 13:33:00 +00:00
Ryan Boren a6015df392 Use admin_url() instead of get_edit_user_link() in wp-login.php since cookies are not yet set. Props SergeyBiryukov. fixes #14787
git-svn-id: https://develop.svn.wordpress.org/trunk@21507 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-14 19:10:37 +00:00
Ryan Boren d2774833b2 Introduce get_edit_user_link(). Props scribu, georgestephanis, johnbillion. fixes #14787 see #20307
git-svn-id: https://develop.svn.wordpress.org/trunk@21364 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-30 18:30:03 +00:00
Andrew Ozz 6e6b727315 Remove nearly all tabindex attributes from the admin, leaving them only where absolutely necessary (for now that's only the toolbar).
Add tabindex="-1" for the menu images links to avoid double tab stops there when the menu is expanded.

Fix/add auto-focus on the first input fields on the Add/Edit Post, all taxonomy, all edit taxonomy, Log In and Edit Comment screens.

See #21340.

git-svn-id: https://develop.svn.wordpress.org/trunk@21311 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-24 00:15:15 +00:00
Andrew Nacin de52076568 Only obey the RELOCATE move flag if it evaluates to true. props TomAuger, JustinSainton, fixes #20636.
git-svn-id: https://develop.svn.wordpress.org/trunk@21251 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-09 19:32:09 +00:00
Andrew Nacin 26f8f3e504 Refresh nonces in the customizer. props koopersmith. see #20876.
git-svn-id: https://develop.svn.wordpress.org/trunk@21135 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-26 18:48:18 +00:00
Ryan Boren ab8deebae3 Customizer: Gravefully handle cookie expipration. Prompt for log in in the preview. Props ocean90, koopersmith, nacin. fixes #20876
git-svn-id: https://develop.svn.wordpress.org/trunk@21031 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-08 19:22:11 +00:00
Andrew Nacin 90e5ed949b When auth_redirect() detects a logged out user and the target
page was about.php?updated, then issue a message welcoming them.

This is to prevent it from being so jolting if you are taken to
the login screen after an update.

In WordPress 3.4, the changes to wp_salt() provide for extra
security, but will cause a log-out for any installs without 8
unique keys and salts in wp-config.php (with some exceptions).
Properly re-issuing cookies, even for the logged in user, is
not easily doable via admin/includes/update-core.php, as that
file is included long after the headers are sent.

see #19599.



git-svn-id: https://develop.svn.wordpress.org/trunk@20887 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-24 21:22:09 +00:00
Andrew Ozz c148fb4eb5 Move mobile devices CSS from wp-login.php to wp-admin.css, props SergeyBiryukov, fixes #19673
git-svn-id: https://develop.svn.wordpress.org/trunk@20430 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-11 01:45:01 +00:00
Andrew Ozz bce0d37a67 Introduce wp_is_mobile() and use it instead of $is_iphone global, see #20014
git-svn-id: https://develop.svn.wordpress.org/trunk@20417 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-10 01:19:30 +00:00
Ryan Boren ee5aae19ef Set post password cookies via an action in wp-login.php. Retire wp-pass.php (one less root file). Obey login ssl preferences for post password form submission. Props SergeyBiryukov. fixes #19798
git-svn-id: https://develop.svn.wordpress.org/trunk@19925 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-14 18:29:22 +00:00
Andrew Nacin ef9ea32a3a Translate http://wordpress.org/ for the wp-login.php header image URL. Clean up. props zeo, fixes #19364.
git-svn-id: https://develop.svn.wordpress.org/trunk@19783 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-29 18:47:41 +00:00
Ryan Boren 2b186b0c45 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: https://develop.svn.wordpress.org/trunk@19712 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-08 17:01:11 +00:00
Andrew Nacin 723ed39622 Use home URL, not siteurl, in the password reset email. fixes #19767.
git-svn-id: https://develop.svn.wordpress.org/trunk@19705 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-07 18:54:08 +00:00
Jon Cave 760471a9a8 Fix mistakes in parameter documentation and add some missing param docs. See #19756.
git-svn-id: https://develop.svn.wordpress.org/trunk@19702 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-06 18:31:43 +00:00
Ryan Boren a8d77cbae9 User lowercase true, false, null instead of uppercase. Props c3mdigital, mfields. fixes #16302
git-svn-id: https://develop.svn.wordpress.org/trunk@19687 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-05 20:50:54 +00:00
Ryan Boren 676ba7043e Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: https://develop.svn.wordpress.org/trunk@19593 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-13 23:45:31 +00:00
Andrew Ozz a7170b0b03 Align login box, messages, navigation links and header image on the login screen, props SergeyBiryukov and helenyhou, fixes #19331
git-svn-id: https://develop.svn.wordpress.org/trunk@19414 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-23 07:03:00 +00:00
Ryan Boren 80ee709653 Introduce wp_no_robots(). Call it for pages that should never be indexed, regardless of blog privacy settings. Props nacin. fixes #19251
git-svn-id: https://develop.svn.wordpress.org/trunk@19304 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-15 20:44:48 +00:00
Andrew Nacin 4ccbc50051 Use wp_login_url() where possible in wp-login.php. props ramiy for initial patch. Escape with a tin foil hat. fixes #19199.
git-svn-id: https://develop.svn.wordpress.org/trunk@19281 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-14 21:08:33 +00:00
Andrew Nacin fc9fcf176e Add 'for' attributes to labels in wp-login.php for extra accessibility. props ppaire, fixes #19178.
git-svn-id: https://develop.svn.wordpress.org/trunk@19189 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-06 20:03:30 +00:00
Andrew Nacin d0115d9821 Remove CSS for interim-login. see #19120.
git-svn-id: https://develop.svn.wordpress.org/trunk@19124 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-02 22:47:21 +00:00
Ryan Boren a8973fb429 Avoid warning when user_login not in POST. Props ampt. fixes #18755
git-svn-id: https://develop.svn.wordpress.org/trunk@19056 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-24 21:31:30 +00:00
Andrew Nacin 1287ec492a Translated strings in attributes require esc_attr(). s/_e/esc_attr_e/g
git-svn-id: https://develop.svn.wordpress.org/trunk@19028 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-20 15:04:46 +00:00