mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-05 08:14:00 +01:00
auth action added
We can now call an auth action along with the token and it will set our flag As a follow up, it continues what we were previously doing - showing manager pane or toggling file display Note: 2 x JS files can probably be removed for now. Was going to look into auth token validation here, but until I do, they're not needed.
This commit is contained in:
@@ -13,6 +13,30 @@ if (!extension_loaded('openssl') || !in_array('https', $wrappers)) {
|
||||
|
||||
// If we have an action to perform
|
||||
if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset($_GET['action']) && $sslAvail) {
|
||||
// ====
|
||||
// AUTH
|
||||
// ====
|
||||
if ($_GET['action']=="auth") {
|
||||
$_SESSION['githubAuthToken'] = xssClean($_GET['token']);
|
||||
echo '<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="base64.js"></script>
|
||||
<script src="github.js"></script>
|
||||
</body>
|
||||
<script>
|
||||
top.ICEcoder.githubAuthTokenSet = true;
|
||||
goNext = "'.xssClean($_GET['goNext']).'";
|
||||
if (goNext=="showManager") {
|
||||
top.ICEcoder.githubManager();
|
||||
}
|
||||
if (goNext=="loadFiles") {
|
||||
top.ICEcoder.githubDiffToggle();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>';
|
||||
}
|
||||
|
||||
// =====
|
||||
// CLONE
|
||||
|
||||
Reference in New Issue
Block a user