-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31c57bd
commit 7a6fb2e
Showing
51 changed files
with
4,972 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
All documentation can be found in the doc/ folder. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<html> | ||
<head><title>Avantslash login</title> | ||
<script type="text/javascript"> | ||
function login() { | ||
var exdate=new Date(); | ||
exdate.setDate(exdate.getDate()+100); | ||
var passcode = document.getElementById("password").value; | ||
document.cookie = "authcode=" + escape(passcode) | ||
+ "; expires="+exdate.toGMTString(); | ||
var newurl = document.location.href.replace('login.html', 'avantify.cgi'); | ||
document.location.href = newurl; | ||
return false; | ||
} | ||
function logout() { | ||
document.cookie = "authcode=zzz"; | ||
return false; | ||
} | ||
</script> | ||
</head> | ||
|
||
|
||
<body> | ||
<h2>AvantSlash login</h2> | ||
<form onsubmit="return login();"> | ||
Passcode: <input type="text" id="password"> | ||
<button onclick="return login();">Login</button> | ||
</form> | ||
|
||
<br> | ||
|
||
<a href="#" onclick="return logout();" id="lo">Logout</a> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
In order to add cookie-based authentication to your AvantSlash site, | ||
copy .htaccess and login.html to the directory containing | ||
avantify.cgi. Edit .htaccess to adapt it to your site and desired | ||
password. | ||
|
||
This probably only works on Apache-based web servers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
### If this script is renamed to "autoupgrade.sh", it can be called | ||
### from avantify.cgi . | ||
### | ||
### Before enabling the autoupdate feature, please consider | ||
### protecting your installation against unauthorized use. | ||
### Your site's URL may show up as an HTTP referrer on other sites. | ||
### See authenticate/ directory for examples for use with Apache. | ||
### | ||
### This script will be called using /bin/sh. Do not use bash-specific | ||
### constructs. | ||
|
||
bailout () { | ||
echo "$@" | ||
echo "Aborted." | ||
exit 1 | ||
} | ||
|
||
[ $# = 0 ] && bailout "Error: call as $0 <version>." | ||
|
||
VERSION="$1" | ||
|
||
tfname="__test$$" | ||
touch $tfname 2>&1 || bailout "No write permission for directory" `pwd` | ||
rm -f $tfname | ||
|
||
tarfname="avantslash-$VERSION.tar.gz" | ||
|
||
date=`date +%Y%m%d_%H%M` | ||
bakfn=avantslash-backup-$date.tar.gz | ||
|
||
# prevent "file '.' changed as we read it" error in GNU tar version <= 1.23 | ||
touch $bakfn | ||
tar czf $bakfn --exclude='*gz' . 2>&1 || | ||
bailout "Error while making backup." | ||
|
||
echo "Stored backup as $bakfn" | ||
|
||
which wget > /dev/null || | ||
bailout "Error: wget executable not available." | ||
|
||
echo "Executing wget..." | ||
wget -O "$tarfname" -U "Avantslash-autoupdate" \ | ||
"http://avantslash.org/tarballs/$tarfname" 2>&1 || | ||
bailout "Error executing wget" | ||
|
||
# note: tarballs unpack to present directory | ||
tar xzf $tarfname 2>&1 || bailout "Error while unpacking $tarfname." | ||
echo "Unpacked $tarfname." | ||
|
||
rm -f cache/* || bailout "Error while cleaning cache." | ||
echo "Cleared cache." | ||
|
||
echo "---AVANTSLASH UPGRADED SUCCESSFULLY TO VERSION $VERSION---" | ||
|
||
exit 0 | ||
|
||
|
Oops, something went wrong.