summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINOPIAE <inopiae@cacert.org>2014-02-22 19:17:51 +0100
committerINOPIAE <inopiae@cacert.org>2014-02-22 19:17:51 +0100
commit7daee44101e058a70d85a6c081d0203462132cc1 (patch)
treebd194edebe8f85254e96b772f0e9a8e639d7be11
parent8dcb5173a750127be3cf1c662f55dab878102987 (diff)
downloadcacert-devel-7daee44101e058a70d85a6c081d0203462132cc1.tar.gz
cacert-devel-7daee44101e058a70d85a6c081d0203462132cc1.tar.xz
cacert-devel-7daee44101e058a70d85a6c081d0203462132cc1.zip
bug 649: added page wot/16.php and implemented the call of this page
-rw-r--r--includes/general.php18
-rw-r--r--pages/wot/16.php78
-rw-r--r--www/wot.php14
3 files changed, 101 insertions, 9 deletions
diff --git a/includes/general.php b/includes/general.php
index d89c0e6..be94549 100644
--- a/includes/general.php
+++ b/includes/general.php
@@ -57,7 +57,7 @@
exit;
}
- if(array_key_exists('HTTP_HOST',$_SERVER) &&
+ if(array_key_exists('HTTP_HOST',$_SERVER) &&
($_SERVER['HTTP_HOST'] == $_SESSION['_config']['securehostname'] ||
$_SERVER['HTTP_HOST'] == $_SESSION['_config']['tverify']))
{
@@ -169,19 +169,19 @@
$points++;
//echo "Points due to length and charset: $points<br/>";
-
+
// check for historical password proposal
if ($pwd === "Fr3d Sm|7h") {
return 0;
}
-
+
return $points;
}
function checkpw($pwd, $email, $fname, $mname, $lname, $suffix)
{
$points = checkpwlight($pwd);
-
+
if(@strstr(strtolower($pwd), strtolower($email)))
$points--;
@@ -232,7 +232,7 @@
{
$bits = explode(": ", $_SESSION['_config']['subject'], 2);
$bits = str_replace(", ", "|", str_replace("/", "|", array_key_exists('1',$bits)?$bits['1']:""));
- $bits = explode("|", $bits);
+ $bits = explode("|", $bits);
$_SESSION['_config']['cnc'] = $_SESSION['_config']['subaltc'] = 0;
$_SESSION['_config']['OU'] = "";
@@ -557,7 +557,7 @@
$fp = @fsockopen($domain,25,$errno,$errstr,5);
if($fp)
{
-
+
$line = fgets($fp, 4096);
while(substr($line, 0, 4) == "220-")
$line = fgets($fp, 4096);
@@ -662,7 +662,7 @@
return $ticket;
}
- function sanitizeHTML($input)
+ function sanitizeHTML($input)
{
return htmlentities(strip_tags($input), ENT_QUOTES);
//In case of problems, please use the following line again:
@@ -732,7 +732,7 @@
$text=preg_replace("/[^\w-.@]/","",$text);
return($text);
}
-
+
// returns text message to be shown to the user given the result of is_no_assurer
function no_assurer_text($Status)
@@ -775,7 +775,7 @@
$name="../$type/$kind/".intval($id/1000)."/$kind-".intval($id).".$type";
if (!is_dir("../csr")) { mkdir("../csr",0777); }
if (!is_dir("../crt")) { mkdir("../crt",0777); }
-
+
if (!is_dir("../csr/$kind")) { mkdir("../csr/$kind",0777); }
if (!is_dir("../crt/$kind")) { mkdir("../crt/$kind",0777); }
if (!is_dir("../csr/$kind/".intval($id/1000))) { mkdir("../csr/$kind/".intval($id/1000)); }
diff --git a/pages/wot/16.php b/pages/wot/16.php
new file mode 100644
index 0000000..c9a9806
--- /dev/null
+++ b/pages/wot/16.php
@@ -0,0 +1,78 @@
+<? /*
+ LibreSSL - CAcert web application
+ Copyright (C) 2004-2008 CAcert Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+include_once("../includes/shutdown.php");
+require_once("../includes/lib/l10n.php");
+?>
+<?
+if(array_key_exists('error',$_SESSION['_config']) && $_SESSION['_config']['error'] != "")
+{
+ ?><font color="orange" size="+1">
+ <? echo _("ERROR").": ".$_SESSION['_config']['error'] ?>
+ </font>
+ <?unset($_SESSION['_config']['error']);
+}
+?>
+<? if(array_key_exists('noemailfound',$_SESSION['_config']) && $_SESSION['_config']['noemailfound'] == 1) { ?>
+<!--<form method="post" action="wot.php">
+<input type="hidden" name="email" value="<?=sanitizeHTML($_POST['email'])?>"><br>
+<select name="reminder-lang">
+ <?
+//if($_SESSION['_config']['reminder-lang'] == "")
+// $_SESSION['_config']['reminder-lang'] = L10n::get_translation();
+// foreach(L10n::$translations as $key => $val)
+// {
+// echo "<option value='$key'";
+// if($key == $_SESSION['_config']['reminder-lang'])
+// echo " selected";
+// echo ">$val</option>\n";
+// }
+ ?>
+ </select><br>
+<input type="hidden" name="oldid" value="<?=$id?>">
+<input type="submit" name="reminder" value="<?=_("Send reminder notice")?>">
+</form> -->
+ <? unset($_SESSION['_config']['noemailfound']); } ?>
+<form method="post" action="wot.php" name="form1">
+<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
+ <tr>
+ <td colspan="2" class="title"><?=_('Check Assurer Status')?></td>
+ </tr>
+ <tr>
+ <td class="DataTD"><?=_('Email to check')?>:</td>
+<? if(array_key_exists('remindersent',$_SESSION['_config']) && $_SESSION['_config']['remindersent'] == 1) { unset($_SESSION['_config']['remindersent']) ?>
+ <td class="DataTD"><input type="text" name="email" id="email" value=""></td>
+ <? } else { ?>
+ <td class="DataTD"><input type="text" name="email" id="email" value="<?=array_key_exists('email',$_POST)?sanitizeHTML($_POST['email']):""?>"></td>
+ <? } ?>
+ </tr>
+ <tr>
+ <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>"></td>
+ </tr>
+</table>
+<input type="hidden" name="oldid" value="<?=$id?>">
+</form>
+<SCRIPT LANGUAGE="JavaScript">
+//<![CDATA[
+ function my_init()
+ {
+ document.getElementById("email").focus();
+ }
+
+ window.onload = my_init();
+//]]>
+</script> \ No newline at end of file
diff --git a/www/wot.php b/www/wot.php
index 7200517..240f21f 100644
--- a/www/wot.php
+++ b/www/wot.php
@@ -80,6 +80,9 @@ function show_page($target,$message,$error)
case '15':
case 'MyPointsNew': includeit(15, "wot");
break;
+ case '16':
+ case 'AssurerCheck': includeit(16, "wot");
+ break;
}
showfooter();
@@ -122,6 +125,7 @@ function send_reminder()
if(array_key_exists('location',$_POST) && $_POST['location'] != "")
$_SESSION['_config']['location'] = $_POST['location'];
+ $id=array_key_exists('id',$_REQUEST)?intval($_REQUEST['id']):0;
$oldid=array_key_exists('oldid',$_REQUEST)?intval($_REQUEST['oldid']):0;
if($oldid == 12)
@@ -566,6 +570,16 @@ $iecho= "c";
exit;
}
+ echo "passt 1";
+
+ if($oldid == 16 )
+ {
+ $oldid=0;
+ $id = 16;
+
+ show_page("AssurerCheck","",_("There was an error and I couldn't proceed"));
+ exit;
+ }
// showheader(_("My CAcert.org Account!"));
// echo "ID now = ".$id."/".$oldid.">>".$iecho;
// includeit($id, "wot");