Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsilver76 authored Nov 29, 2021
1 parent 31c57bd commit 7a6fb2e
Show file tree
Hide file tree
Showing 51 changed files with 4,972 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.1ST
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
All documentation can be found in the doc/ folder.
Binary file added apple-touch-icon-ipad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apple-touch-icon-iphone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apple-touch-icon-iphone4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions authenticate/login.html
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>
6 changes: 6 additions & 0 deletions authenticate/readme.txt
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.
57 changes: 57 additions & 0 deletions autoupgrade-disabled.sh
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


Loading

0 comments on commit 7a6fb2e

Please sign in to comment.