rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: mademan on December 20, 2007, 03:18:53 PM

Title: passwords with expiration date, possible?
Post by: mademan on December 20, 2007, 03:18:53 PM
will this be implemented in future updates? ths would be great to prevent abuse on the server, like if i give a person password i can put when will it expires, EXAMPLE 12/13/08 -> expires on 12/20/08 so by midnight it will not be valid anymore
Title: Re: passwords with expiration date, possible?
Post by: rejetto on December 20, 2007, 03:44:30 PM
ok accepted, but don't ask when :)
Title: Re: passwords with expiration date, possible?
Post by: feripple on October 31, 2020, 05:06:38 AM
Hello
Has this feature been added?
Title: Re: passwords with expiration date, possible?
Post by: dj on October 31, 2020, 07:46:55 AM
welcome,
quickly tinkered something1
also possible on the server side2

1if you use mobil-light, set reload=true
2but you must use Delphi time format


add expiration date to account notes, e.g. 11/1/2020

Code: [Select]
[+]
<script>
if(new Date()>new Date('{.get account||notes.}')) if(location.pathname!='/') location='/';  //else alert('pwd expired')
</script>


2 add days since 2021 to account notes, e.g. 1 for 1/1/2021
Code: [Select]
[+]
{.if|{.>|{.time|y.}|{.time|y|when={.calc|44196+{.get account||notes.}.}.}.}|{:{.set account||enabled=0.}:}.}