- Timestamp:
- 02/20/2017 11:49:01 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/common/includes/wporg-sso/class-wporg-sso.php
r4960 r4964 2 2 if ( ! class_exists( 'WPOrg_SSO' ) ) { 3 3 /** 4 * Single Sign-On (SSO) handling for WordPress/bbPress /GlotPressinstances under *.wordpress.org.4 * Single Sign-On (SSO) handling for WordPress/bbPress instances under *.wordpress.org. 5 5 * 6 6 * @author stephdau … … 51 51 52 52 // If we got a host by now, it's a safe wordpress.org-based one, add it to the list of allowed redirects 53 if ( ! empty( $host ) && ! in_array( $host, $hosts ) ) {53 if ( ! empty( $host ) && ! in_array( $host, $hosts ) ) { 54 54 $hosts[] = $host; 55 55 } … … 81 81 82 82 } 83 84 83 85 84 /** … … 114 113 $redirect_to = $redirect_to_referrer; 115 114 } 116 } else {115 } else { 117 116 // Otherwise, attempt to guess the parent dir of where they came from and validate that. 118 117 $redirect_to_source_parent = preg_replace( '/\/[^\/]+\.php\??.*$/', '/', "https://{$this->host}{$_SERVER['REQUEST_URI']}" ); … … 153 152 * Validates if target URL is within our bounds, then redirects to it if so, or to WP.org homepage (returns if headers already sent). 154 153 * 155 * @param string $to Destination URL 156 * @param number $status HTTP redirect status, defaults to 302 154 * @note: using our own over wp_safe_redirect(), etc, because not all targeted platforms (WP/BB/GP/etc) implement an equivalent, we run early, etc. 157 155 * 158 * @note: using our own over wp_safe_redirect(), etc, because not all targeted platforms (WP/BB/GP/etc) implement an equivalent, we run early, etc. 156 * @param string $to Destination URL 157 * @param int $status HTTP redirect status, defaults to 302 159 158 */ 160 159 protected function _safe_redirect( $to, $status = 302 ) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)