This commit is contained in:
2020-04-12 17:36:51 -04:00
parent 0e55c3b953
commit bf3e60730a
6 changed files with 617 additions and 669 deletions
+6 -10
View File
@@ -1,13 +1,12 @@
To: {{email}}
Subject: PayQuic - Password Reset for {{email}} with {{lost_added}}
Subject: CoreGrade - Password Reset for {{email}} Completed
<html>
<head>
</head>
<body>
<pre>
<table cellpadding="2" cellspacing="2" border="0" style="height:30px; width:400px; font-size:12px;color:#333333;width:100%;border-width: 0px;border-color: #9dcc7a;border-collapse: collapse;">
<tr><td><span align=center><img src="http://www.payquic.com/images/logo.png" alt="PayQuic"></span></td></tr>
<tr><td><span align=center><img src="https://{{server_name}}/images/coregrade.png" alt="CoreGrade"></span></td></tr>
<tr>
<td style="font-size:12px; text-alig:left;">
Dear {{firstname}}
@@ -19,18 +18,15 @@ As you requested, your password has been reset.
</td>
</tr>
<tr>
<td style="font-size:12px; text-alig:left;">
If it was not at your request, then please contact PayQuic support immediately.
For further support go to our website at www.PayQuic.com or call 08188697770 between the hours of 10:00 AM and 5:00 PM.
Thank you for choosing PayQuic.
PayQuic Team.
If it was not at your request, then please contact CoreGrade support immediately.
For further support go to our website at https://{{server_name}} or call 08188697770 between the hours of 10:00 AM and 5:00 PM.
Thank you for choosing CoreGrade.
CoreGrade Team.
</td>
</tr>
</table>
<br>
+1 -1
View File
@@ -9,7 +9,7 @@ Subject: CoreGrade - Password Reset for {{email}}
<table cellpadding="2" cellspacing="2" border="0" style="height:30px; width:400px; font-size:12px;color:#333333;width:100%;border-width: 0px;border-color: #9dcc7a;border-collapse: collapse;">
<tr><td><span align=center><img src="{{server_name}}/images/logo.png" alt="CoreGrade"></span></td></tr>
<tr><td><span align=center><img src="https://{{server_name}}/images/coregrade.png" alt="CoreGrade"></span></td></tr>
<tr>
<td style="font-size:12px; text-alig:left;">
Dear {{firstname}}
+7 -5
View File
@@ -269,20 +269,21 @@ long completePassReset(CVars in, CVars &out) {
logfmt(logINFO, "completePassReset()");
long ret = PHP_API_BAD_PARAM;
CVars x, y;
out["reset_complete"] = "0";
try {
REQ_STRING(in, "username", 2, 49, "(.*)");
REQ_STRING(in, "newpass", 5, 15, "(.*)");
REQ_LONG(in, "reset_pin", 0, -1);
REQ_STRING(in, "new_pass", 5, 15, "(.*)");
REQ_LONG(in, "reset_id", 0, -1);
REQ_STRING(in, "reset_key", 2, 49, "(.*)");
const char *loc = getenv("REMOTE_ADDR");
ret = load_db_record(out, "SELECT *,id AS reset_id FROM password_reset WHERE status=1 AND LOWER(username)=LOWER('%s') AND reset_pin='%lu' AND loc='%s' AND reset_key='%s'", in["username"].c_str(), in["reset_pin"].Long(), loc, in["reset_key"].c_str());
ret = load_db_record(out, "SELECT *,id AS reset_id FROM password_reset WHERE status=1 AND LOWER(username)=LOWER('%s') AND id='%lu' AND loc='%s' AND reset_key='%s'", in["username"].c_str(), in["reset_id"].Long(), loc, in["reset_key"].c_str());
if (ret && out["reset_id"].Long() > 0) {
char mcf[128];
int result = 0; //libscrypt_hash(mcf, in["password"].c_str(), SCRYPT_N, SCRYPT_r, SCRYPT_p);
int result = 100; //libscrypt_hash(mcf, in["password"].c_str(), SCRYPT_N, SCRYPT_r, SCRYPT_p);
if (result > 0) {
if (pgsql_query("UPDATE members SET password='%s' WHERE id =%lu", mcf, out["member_id"].Long()) >= 0) {
if (pgsql_query("UPDATE members SET password=md5('%s') WHERE id =%lu", in["new_pass"].c_str(), out["member_id"].Long()) >= 0) {
pgsql_query("UPDATE password_reset SET status = 5,reset_key=NULL WHERE id =%lu", out["reset_id"].Long());
ret = PHP_API_OK;
}
@@ -290,6 +291,7 @@ long completePassReset(CVars in, CVars &out) {
out["reset_key"] = "YOU WILL GET THIS IF PIN IS CORRECT IN CONFIRM"; //x["reset_key"];
out["mode"] = RESET_COMPLETE;
member_email_calls(in["action"].Long(), out, x); // note the use of out to send in
out["reset_complete"] = out["reset_id"];
} else {
logfmt(logINFO, "ERROR create hash using SCRYPT");
}
File diff suppressed because it is too large Load Diff
+5 -4
View File
@@ -165,7 +165,7 @@ class Auth extends Start_Controller {
$data["error_message"] = '';
if ($_POST) {
$data['reset_key'] = trim($this->input->post('rlink'));
$data['reset_key'] = trim($this->input->post('reset_key'));
$data['reset_id'] = trim($this->input->post('reset_id'));
$data['username'] = trim($this->input->post('username'));
@@ -176,14 +176,15 @@ class Auth extends Start_Controller {
if ( strlen($data['pass1']) >7 && $data['pass1'] == $data['pass2']){
$allow_next = true;
$data["new_pass"] = $data['pass1'];
}
else{
$data["error_message"] = "Please enter a valis username to continue";
$data["error_message"] = "Please enter a valid password to continue";
}
//print_r( $data );
$data["mode"] = RESET_COMPLETE;
if ($data['reset_key'] != '' && isset($out["reset_id"]) && isset($out["reset_id"]) > 0 && $allow_next == true) {
if ($data['reset_key'] != '' && isset($data["reset_id"]) && isset($data["reset_id"]) > 0 && $allow_next == true) {
$this->coregrade_webapi(COREGRADE_START_RESET_PASSWORD, $data, $out);
// print_r($out);
+5 -4
View File
@@ -205,8 +205,9 @@
<li data-value="tutor"><span>Parents</span></li>
-->
</ul>
<p class="wow fadeIn">A Modern, intuitive, effective digital learning <p >experience that minimizes complexity and </p><p>enables personalized learning at a convenience.</p>
<p class="wow fadeIn">A Modern, intuitive, effective digital learning experience that minimizes complexity and enables personalized learning at a convenience.</p>
<p>
</p>
<p class="fade-text wow fadeIn">Let Us Be Your Companion <a href="#">Lets talk</a></p>
</div>
</div>
@@ -226,7 +227,7 @@
<li id="company">
<h2 class="lead2">CoreGrade Plus</h2>
<span class="price-tag">Contact Us</span>
<h4 class="sublead">Quality support that <br> drives success</h4>
<h4 class="sublead">Holistic learning that <br> lights up</h4>
<ul class="pricing-list">
<li><p>Everything Individual + </p></li>
<li><p>Integrations</p></li>
@@ -368,7 +369,7 @@
<div class="vr-title-area">
<h4>Contact Us</h4>
</div>
<h3>[]<span class="thin">CoreGrade</span></h3>
<h3><span class="thin">CoreGrade</span></h3>
<p>Email :support@coregrade.com</p>
<p>Phone : 404-858-7966</p>
<ul class="social-icon">