Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Display login in auth form (regression)

  • Loading branch information...
commit 9bb0fdc91bf823e0fa114d51a1a39f1ee1795590 1 parent ac8ff42
@vrana authored
View
2  adminer/include/adminer.inc.php
@@ -702,7 +702,7 @@ function navigation($missing) {
foreach ($usernames as $username => $password) {
if (isset($password)) {
if ($first) {
- echo "<p>\n";
+ echo "<p onclick='eventStop(event);'>\n";
$first = false;
}
echo "<a href='" . h(auth_url($driver, $server, $username)) . "'>($drivers[$driver]) " . h($username . ($server != "" ? "@$server" : "")) . "</a><br>\n";
View
3  adminer/include/auth.inc.php
@@ -73,9 +73,8 @@ function auth_error($exception = null) {
}
}
}
- unset($_GET["username"]); // checked in page_header() for successful login
page_header(lang('Login'), $error, null);
- echo "<form action='' method='post'>\n";
+ echo "<form action='' method='post' onclick='eventStop(event);'>\n";
$adminer->loginForm();
echo "<div>";
hidden_fields($_POST, array("driver", "server", "username", "password", "permanent")); // expired session
View
2  adminer/include/design.inc.php
@@ -32,7 +32,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
<link rel="stylesheet" type="text/css" href="adminer.css">
<?php } ?>
-<body class="<?php echo lang('ltr'); ?>"<?php if (isset($_GET["username"])) { ?> onclick="return bodyClick(event, '<?php echo js_escape(DB); ?>', '<?php echo js_escape($_GET["ns"]); ?>');"<?php } ?> onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>', '<?php echo $protocol; ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion('$protocol');"); ?>">
+<body class="<?php echo lang('ltr'); ?>" onclick="return bodyClick(event, '<?php echo js_escape(DB); ?>', '<?php echo js_escape($_GET["ns"]); ?>');" onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>', '<?php echo $protocol; ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion('$protocol');"); ?>">
<script type="text/javascript" src="../adminer/static/functions.js"></script>
<script type="text/javascript" src="static/editing.js"></script>
View
13 adminer/static/editing.js
@@ -399,16 +399,3 @@ function schemaMouseup(ev) {
cookie('adminer_schema=' + encodeURIComponent(s.substr(1)), 30, '; path="' + location.pathname + location.search + '"');
}
}
-
-
-
-/** Stop event propagation
-* @param Event
-*/
-function eventStop(event) {
- if (event.stopPropagation) {
- event.stopPropagation();
- } else {
- event.cancelBubble = true;
- }
-}
View
11 adminer/static/functions.js
@@ -393,3 +393,14 @@ function bodyClick(event, db, ns) {
}
return true;
}
+
+/** Stop event propagation
+* @param Event
+*/
+function eventStop(event) {
+ if (event.stopPropagation) {
+ event.stopPropagation();
+ } else {
+ event.cancelBubble = true;
+ }
+}
View
2  editor/include/adminer.inc.php
@@ -479,7 +479,7 @@ function navigation($missing) {
foreach ((array) $_SESSION["pwds"]["server"][""] as $username => $password) {
if (isset($password)) {
if ($first) {
- echo "<p>\n";
+ echo "<p onclick='eventStop(event);'>\n";
$first = false;
}
echo "<a href='" . h(auth_url("server", "", $username)) . "'>" . ($username != "" ? h($username) : "<i>" . lang('empty') . "</i>") . "</a><br>\n";
Please sign in to comment.
Something went wrong with that request. Please try again.