mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-15 12:43:33 +09:00
- fixed XSS issue with current profile URL
This commit is contained in:
@@ -4346,14 +4346,14 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
if ( UM()->options()->get( 'profile_empty_text' ) ) {
|
||||
|
||||
$emo = UM()->options()->get( 'profile_empty_text_emo' );
|
||||
if ($emo) {
|
||||
if ( $emo ) {
|
||||
$emo = '<i class="um-faicon-frown-o"></i>';
|
||||
} else {
|
||||
$emo = false;
|
||||
}
|
||||
|
||||
if (um_is_myprofile()) {
|
||||
$output .= '<p class="um-profile-note">' . $emo . '<span>' . sprintf( __( 'Your profile is looking a little empty. Why not <a href="%s">add</a> some information!', 'ultimate-member' ), um_edit_profile_url() ) . '</span></p>';
|
||||
if ( um_is_myprofile() ) {
|
||||
$output .= '<p class="um-profile-note">' . $emo . '<span>' . sprintf( __( 'Your profile is looking a little empty. Why not <a href="%s">add</a> some information!', 'ultimate-member' ), esc_url( um_edit_profile_url() ) ) . '</span></p>';
|
||||
} else {
|
||||
$output .= '<p class="um-profile-note">' . $emo . '<span>' . __( 'This user has not added any information to their profile yet.', 'ultimate-member' ) . '</span></p>';
|
||||
}
|
||||
|
||||
@@ -88,14 +88,14 @@ if ( ! class_exists( 'um\core\Permalinks' ) ) {
|
||||
if ( !$id = $wp_the_query->get_queried_object_id() )
|
||||
return;
|
||||
|
||||
if( UM()->config()->permalinks['user'] == $id ) {
|
||||
$link = $this->get_current_url();
|
||||
if ( UM()->config()->permalinks['user'] == $id ) {
|
||||
$link = esc_url( $this->get_current_url() );
|
||||
echo "<link rel='canonical' href='$link' />\n";
|
||||
return;
|
||||
}
|
||||
|
||||
$link = get_permalink( $id );
|
||||
if ( $page = get_query_var('cpage') ){
|
||||
if ( $page = get_query_var( 'cpage' ) ){
|
||||
$link = get_comments_pagenum_link( $page );
|
||||
echo "<link rel='canonical' href='$link' />\n";
|
||||
}
|
||||
@@ -303,7 +303,7 @@ if ( ! class_exists( 'um\core\Permalinks' ) ) {
|
||||
* @return string
|
||||
*/
|
||||
function add_query( $key, $value ) {
|
||||
$this->current_url = add_query_arg( $key, $value, $this->get_current_url() );
|
||||
$this->current_url = add_query_arg( $key, $value, $this->get_current_url() );
|
||||
return $this->current_url;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ function um_dynamic_login_page_redirect( $redirect_to = '' ) {
|
||||
|
||||
$uri = um_get_core_page( 'login' );
|
||||
|
||||
if (!$redirect_to) {
|
||||
if ( ! $redirect_to ) {
|
||||
$redirect_to = UM()->permalinks()->get_current_url();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user