Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WordPress_SexHackMe_Plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
WordPress_SexHackMe_Plugin
Commits
754eb3dd
Commit
754eb3dd
authored
Jul 02, 2022
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add options for reset password mail redirects
parent
ba5be614
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
8 deletions
+28
-8
pms_reset_password_fix.php
classes/pms_reset_password_fix.php
+13
-3
pms_woocommerce_registration_integration.php
classes/pms_woocommerce_registration_integration.php
+10
-2
sexhack_gallery.php
classes/sexhack_gallery.php
+1
-1
pwdutils.php
helpers/pwdutils.php
+4
-2
No files found.
classes/pms_reset_password_fix.php
View file @
754eb3dd
...
@@ -71,8 +71,12 @@ if(!class_exists('SexhackPmsPasswordDataLeak')) {
...
@@ -71,8 +71,12 @@ if(!class_exists('SexhackPmsPasswordDataLeak')) {
//If entered username or email is valid (no errors), email the password reset confirmation link
//If entered username or email is valid (no errors), email the password reset confirmation link
if
(
count
(
pms_errors
()
->
get_error_codes
()
)
==
0
&&
!
$error
)
{
if
(
count
(
pms_errors
()
->
get_error_codes
()
)
==
0
&&
!
$error
)
{
$mailpage
=
get_option
(
'sexhack_registration_mail_endpoint'
,
false
);
send_changepwd_mail
(
$user
);
if
(
$mailpage
)
{
$page
=
get_page
(
$mailpage
);
$mailpage
=
$page
->
post_name
;
}
send_changepwd_mail
(
$user
,
$mailpage
);
/*
/*
if (is_object($user)) { //user data is set
if (is_object($user)) { //user data is set
$requestedUserID = $user->ID;
$requestedUserID = $user->ID;
...
@@ -130,6 +134,12 @@ if(!class_exists('SexhackPmsPasswordDataLeak')) {
...
@@ -130,6 +134,12 @@ if(!class_exists('SexhackPmsPasswordDataLeak')) {
}
}
}
}
$SEXHACK_SECTION
=
array
(
'class'
=>
'SexhackPmsPasswordDataLeak'
,
'description'
=>
'Fix Pay Member Subscription password-reset data leak'
,
'name'
=>
'sexhackme_pms_resetfix'
);
$SEXHACK_SECTION
=
array
(
'class'
=>
'SexhackPmsPasswordDataLeak'
,
'description'
=>
'Fix Pay Member Subscription password-reset data leak'
,
'name'
=>
'sexhackme_pms_resetfix'
,
'require-page'
=>
array
(
array
(
'post_type'
=>
'page'
,
'title'
=>
'Reset password page'
,
'option'
=>
'sexhack_reset_pwd_fix'
)
)
);
?>
?>
classes/pms_woocommerce_registration_integration.php
View file @
754eb3dd
...
@@ -94,8 +94,13 @@ if(!class_exists('PmsWoocommerceRegistrationIntegration')) {
...
@@ -94,8 +94,13 @@ if(!class_exists('PmsWoocommerceRegistrationIntegration')) {
}
}
public
function
send_register_email_reset_password
(
$user_data
)
public
function
send_register_email_reset_password
(
$user_data
)
{
{
send_changepwd_mail
(
$user_data
[
"user_login"
]);
$mailpage
=
get_option
(
'sexhack_registration_mail_endpoint'
,
false
);
if
(
$mailpage
)
{
$page
=
get_page
(
$mailpage
);
$mailpage
=
$page
->
post_name
;
}
send_changepwd_mail
(
$user_data
[
"user_login"
],
$mailpage
);
}
}
// XXX 8==D
// XXX 8==D
...
@@ -115,6 +120,9 @@ $SEXHACK_SECTION = array(
...
@@ -115,6 +120,9 @@ $SEXHACK_SECTION = array(
'class'
=>
'PmsWoocommerceRegistrationIntegration'
,
'class'
=>
'PmsWoocommerceRegistrationIntegration'
,
'description'
=>
'Integrate woocommerce account page and sexhack modified registration form on pms to send password change link by email'
,
'description'
=>
'Integrate woocommerce account page and sexhack modified registration form on pms to send password change link by email'
,
'name'
=>
'sexhackme_pmswooregistration'
,
'name'
=>
'sexhackme_pmswooregistration'
,
'require-page'
=>
array
(
array
(
'post_type'
=>
'page'
,
'title'
=>
'Set password mail page'
,
'option'
=>
'sexhack_registration_mail_endpoint'
)
),
'slugs'
=>
array
(
'account'
,
'register'
,
'login'
,
'password-reset'
)
'slugs'
=>
array
(
'account'
,
'register'
,
'login'
,
'password-reset'
)
);
);
...
...
classes/sexhack_gallery.php
View file @
754eb3dd
...
@@ -380,7 +380,7 @@ if(!class_exists('SexHackVideoGallery')) {
...
@@ -380,7 +380,7 @@ if(!class_exists('SexHackVideoGallery')) {
$SEXHACK_SECTION
=
array
(
$SEXHACK_SECTION
=
array
(
'class'
=>
'SexHackVideoGallery'
,
'class'
=>
'SexHackVideoGallery'
,
'description'
=>
'Create Video galleries for Sexhack Video products'
,
'description'
=>
'Create Video galleries for Sexhack Video products'
,
'require-page'
=>
true
,
//
'require-page' => true,
'name'
=>
'sexhackme_videogallery'
'name'
=>
'sexhackme_videogallery'
);
);
...
...
helpers/pwdutils.php
View file @
754eb3dd
...
@@ -50,8 +50,10 @@ function send_changepwd_mail($user_login, $baseurl=false){
...
@@ -50,8 +50,10 @@ function send_changepwd_mail($user_login, $baseurl=false){
$message
.=
sprintf
(
__
(
'Username: %s'
),
$user_login
)
.
"
\r\n\r\n
"
;
$message
.=
sprintf
(
__
(
'Username: %s'
),
$user_login
)
.
"
\r\n\r\n
"
;
$message
.=
__
(
'If this was a mistake, just ignore this email and nothing will happen.'
)
.
"
\r\n\r\n
"
;
$message
.=
__
(
'If this was a mistake, just ignore this email and nothing will happen.'
)
.
"
\r\n\r\n
"
;
$message
.=
__
(
'To reset your password, visit the following address:'
)
.
"
\r\n\r\n
"
;
$message
.=
__
(
'To reset your password, visit the following address:'
)
.
"
\r\n\r\n
"
;
// XXX Seriously? hardcoded?
$message
.=
'<'
.
network_site_url
(
"/password-reset/?key=
$key
&loginName="
.
rawurlencode
(
$user_login
),
'login'
)
.
">
\r\n
"
;
// XXX This is an hardcoded default. Do I really like it that way?
if
(
!
$baseurl
)
$baseurl
=
'password-reset'
;
$message
.=
'<'
.
network_site_url
(
"/
$baseurl
/?key=
$key
&loginName="
.
rawurlencode
(
$user_login
),
'login'
)
.
">
\r\n
"
;
//$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . ">\r\n";
//$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . ">\r\n";
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment