Skip to content

Commit

Permalink
Merge pull request #1779 from tcmitchell/1778-redirect
Browse files Browse the repository at this point in the history
Fix a redirect issue on upload ssh key
  • Loading branch information
tcmitchell authored Jan 18, 2017
2 parents e492c31 + bea4036 commit cf6f150
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

## Changes

* None
* Fix redirect on upload ssh key
([#1778](https://github.com/GENI-NSF/geni-portal/issues/1778))

## Installation Notes

Expand Down
6 changes: 3 additions & 3 deletions portal/www/portal/uploadsshkey.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@
echo "</div>\n";
}
include('uploadsshkey.html');

// show button only if there are no SSH keys on file
// don't let user generate public/private keypair if
// they already have 1+ public keys on file
$keys = $user->sshKeys();
if (count($keys) == 0) {
echo "<p>If you don't have an SSH keypair or want to create a new SSH keypair, <button onClick=\"window.location='generatesshkey.php'\">generate and download an SSH keypair</button>.</p>";
}

include("footer.php");
exit;
}
Expand All @@ -96,7 +96,7 @@

$_SESSION['lastmessage'] = "Uploaded SSH public key from " . $_FILES["file"]["name"];

relative_redirect('profile');
relative_redirect('profile.php');
?>
Your key was uploaded.<br/>
<a href="profile.php">My Profile page</a>

0 comments on commit cf6f150

Please sign in to comment.