-
Notifications
You must be signed in to change notification settings - Fork 193
Description
Hi, I'm running into an issue with my portals.
When I add a default portal, basic or targeted on a clean install, it works. The Portal is added and when I hit activate, it does activate as expected.
The Targeted portal does throw some errors, here is possible fix:
<?php
// Check if 'HTTP_URI' exists in the $_SERVER array
if (isset($_SERVER['HTTP_URI'])) {
$uri = $_SERVER['HTTP_URI'];
} else {
$uri = 'default';
}
$destination = "http://" . $_SERVER['HTTP_HOST'] . (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '') . "";
require_once('helper.php');
?>
<HTML>
<HEAD>
<title>Evil Portal</title>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<script type="text/javascript">
function redirect() { setTimeout(function(){window.location = "/captiveportal/index.php";},100);}
</script>
</HEAD>
<BODY>
<div style="text-align: center;">
<h1>Evil Portal</h1>
<p>This is the default Evil Portal page.</p>
<p>The SSID you are connected to is <?=getClientSSID($_SERVER['REMOTE_ADDR']);?></p>
<p>Your host name is <?=getClientHostName($_SERVER['REMOTE_ADDR']);?></p>
<p>Your MAC Address is <?=getClientMac($_SERVER['REMOTE_ADDR']);?></p>
<p>Your internal IP address is <?=$_SERVER['REMOTE_ADDR'];?></p>
<form method="POST" action="/captiveportal/index.php" onsubmit="redirect()">
<input type="hidden" name="target" value="<?=$destination?>">
<button type="submit">Authorize</button>
</form>
</div>
</BODY>
</HTML>
The second most important issue is when I upload my own portals.
They appear but when I hit activate, I get this error "Error Activating Portal". Now this could be a problem in my portals (Kleo portals modded), but here comes the big issue; when I hit the activate button, also the standard portals start throwing this error. If I remove them, or even delete the module and re-add the module, I keep getting the error, even when I manually delete all EP related folders in the MK7 root folder.
Could this be looked at?
O and one more thing, I have noticed that the structure of the .ep file has changed. When I add my own portals with this new structure, they keep comming up as BASIC instead of targeted. Theredore the Preview and View Log buttons are mising???
{
"name": "Test",
"type": "targeted",
"targeted_rules": {
"default": "default.php",
"rule_order": [
"mac",
"ssid",
"hostname",
"useragent"
],
"rules": {
"mac": {
"exact": {},
"regex": {}
},
"ssid": {
"exact": {},
"regex": {}
},
"hostname": {
"exact": {},
"regex": {}
},
"useragent": {
"exact": {},
"regex": {}
}
}
}
}