Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bmartino1

Pages: [1] 2 3 ... 53
1
Bug reports / Re: LARGE folders
« on: October 13, 2018, 03:12:43 PM »
I would have you reconfigure hfs back to default(redownload and start over). Use real folders (verfy your file permission to everyone read access)

There have been other who reported simlar issue.
Normally came down to a different template was used(error in code), file permission issues, file path name too long, not using real folder, moving hfs and it vfs to a new location and not have the filenames and path as original setup, many other error that can be found on the forum...

I would have you first check at file permission of the file that at least give everyone read access to the files.

2
Bug reports / Re: HFS not able to start.
« on: October 12, 2018, 01:48:25 PM »
Side note for a FYI, all windows machine including home have rep support for windows built in see here: https://www.google.com/amp/s/www.windowscentral.com/how-use-remove-desktop-app-connect-pc-windows-10-0%3famp

And there always third party tools such as TeamViewer.

Was a courisity. :P

3
Bug reports / Re: HFS not able to start.
« on: October 12, 2018, 01:41:23 PM »
I've been trying to isolate your error. As Leo said, your the first to submit something  on this type of error. Out courisity, are you using a remote desktop to the machine?

As your error is pulling some for remote screen mirrored. And potentially netframework errors. (Hfs doesn't rely on net framework installation, but it's worth a check)...

I'm glad you at least found a working build for the moment.

From what I can tell/process from the error message given by windows is:

Windows is complaining about a missing dll file, or a older dll file on which when ran a memory handle exception occurred.

Also what windows 10 build are you running?
Cmd > winver

5
Beta / Re: version 2.4
« on: September 21, 2018, 04:39:19 PM »
Have downloaded and will test here in a bit with Android pixel 2 phone amoung other testing device.

6
HFS ~ HTTP File Server / Re: HFS behind Nginx reverse proxy
« on: September 15, 2018, 10:10:24 PM »
Did you bind hfs to a real folder.

I would first set a bind and then eidte or reuse the default template at the root in that folder(hfs.diff.tpl) before the proxy to verify file cashed and load.

Otherwise you will have to settle up IP hfs connect is on

7
HTML & templates / Re: Alternative login form for modern browsers
« on: August 28, 2018, 03:33:10 PM »
thank you leo, the code works fairly well.

I did attempt to add/change css and put form stuff in it as per dany request on what it might have... etc...

here is that code for refference.

Code: [Select]
[unauthorized]

<!-- I should be a EVENT Under the House - "Home icon / " Root Virtual File system!-->
<!-- include css file here-->
    <style> /* below line is write to use google font online  */
@import url(http://fonts.googleapis.com/css?family=Ubuntu);
 
h2{
 background-color: #FEFFED;
 padding: 30px 35px;
 margin: -10px -50px;
 /*text-align:center; */
 border-radius: 10px 10px 0 0;
}
 
hr{
 margin: 10px -50px;
 border: 0;
 border-top: 1px solid #ccc;
 margin-bottom: 40px;
}
 
div.container{
 width: 900px;
 height: 610px;
 margin:35px auto;
 font-family: 'Ubuntu', sans-serif;
}
 
div.main{
 width: 300px;
 padding: 10px 50px 25px;
 /* border: 2px solid gray; */
 border-radius: 10px;
 font-family: raleway;
 float:left;
 margin-top:50px;
}
 
input[type=text],input[type=password]{
 width: 150px;
 height: 40px;
 padding: 5px;
 margin-bottom: 25px;
 margin-top: 5px;
 border: 2px solid #ccc;
 color: #4f4f4f;
 font-size: 16px;
 border-radius: 5px;
}

label{
 color: #464646;
 text-shadow: 0 1px 0 #fff;
 font-size: 14px;
 font-weight: bold;
}

center{
 font-size:32px;
}

.note{
 color:red;
}
 
.valid{
 color:green;
}

.back{
 text-decoration: none;
 border: 1px solid rgb(0, 143, 255);
 background-color: rgb(0, 214, 255);
 padding: 3px 20px;
 border-radius: 2px;
 color: black;
}
 
input[type=button]{
 font-size: 16px;
 background: linear-gradient(#ffbc00 5%, #ffdd7f 100%);
 border: 1px solid #e5a900;
 color: #4E4D4B;
 font-weight: bold;
 cursor: pointer;
 width: 150px;
 border-radius: 5px;
 padding: 10px 0;
 outline:none;
}
 
input[type=button]:hover{
 background: linear-gradient(#ffdd7f 5%, #ffbc00 100%);
}

.fugo{
 float:right;
} </style>

<script>
function NewLogin() {
  var xhr = new XMLHttpRequest();
  var ThisFolder = window.location;
  var ThisUser = document.getElementById("usr").value;
  var ThisPass = document.getElementById("psw").value;
  var LoginToken = ThisUser+':'+ThisPass;
  xhr.open("GET", "/~login", true);
  xhr.withCredentials = true;
  xhr.setRequestHeader("Authorization", 'Basic ' + btoa(LoginToken));
  xhr.onreadystatechange = function() {
    if (xhr.readyState == 4 && xhr.status == 200) {
      if (window.location.href.indexOf("~login") != -1) {
        window.location.replace('/?success');
        } else {
          window.location.replace(ThisFolder);
      };
    }
    if (xhr.readyState == 4 && xhr.status == 401) {
      alert("Invalid credentials! \(Wrong username or password\)");
    }
  }
  xhr.send();
}
</script>
<h1>{.!Unauthorized.} {.!&#47; Please login&hellip;.}</h1>
{.!Either your user name and password do not match, or you are not permitted to access this resource..}<br>
{.!Please login to access to your account, and check if you have the correct permissions to continue..}<br>
<br>

<div class="container">
  <div class="main">
  <div align="left">
<!-- <h2>Login Form</h2><hr/> -->
<!-- <form id="form_id" name="myform"> -->
<fieldset id='login'>
  <legend><img src="/~img27"> {.!Login.}</legend>
  <center>
  <label for="uname">User Name :</label></br>
    <input type='text' class="form-control" id='usr' tabindex="1" size='15' placeholder=" Username" value="" required><br>
    <span class='error-message' id='uname-error'></span>

<label>Password :</label></br>
<input type='password' class="form-control" id='psw' tabindex="2" size='15' placeholder=" Password" value="" required><br>
    <span class='error-message' id='pw-error'></span>

<input type='button' tabindex="3" class="btn btn-default" id='lognow' style="width:110px;" value="{.!Login.}" onclick="NewLogin();">
    <span class='error-message' id='submit-error'></span>

<!--    <label><input type="checkbox" checked="checked" name="remember"> Remember me </label> -->
<!-- <button type="button" class="cancelbtn">Cancel</button> <span class="psw">Forgot <a href="#">password?</a></span> -->
<!-- </form> -->

 </center>
</fieldset>
</div>
  </div>
</div>
<br>
</br>
<!-- Did I work? -->
<p> User: %user% @ IP: %ip% </p>
</div>

i had did a test of 2 vitural folder eacch with 1 acount acess split between 2 accounts.

the unathoruzed code will log you in 1 for that folder (it doen't keep you loged in if i leave to another area.)

also the only way i could eror was to click ont he resouce and hit cancle
thus i hit the even t created 404 login.
but you err wrong credential broungh back the default login box (had to hit cancle) before i saw the alert.

other wise, exclent code, and thank you for this.

Also looks like o need to relearn the xml httl request and HTML code :/
https://stackoverflow.com/questions/28238514/login-form-valiation-using-xmlhttprequest

8
HTML & templates / Re: No cookies for a certain folder?
« on: August 28, 2018, 02:32:49 PM »
I was wondering if it were possible, probably with hfs.events, to have no cookies issued or attempted for a certain folder? 
Perhaps it is a folder of support graphics, such as wallpapers; or, perhaps HFS is pulling dual duty also supporting a wholly different website in addition to its normal duties.  Or, in my case, I need to do that for markup speed testing.

i don't know if it removes the cookie, mars has code that edits the session id withi is the cookie..:
then rejeto rescenlty add header removal stuff like this code here:

http://rejetto.com/forum/index.php?topic=13046.msg1063940#msg1063940
http://rejetto.com/forum/index.php?topic=11705.0

i don't know if the header option removes the actual cookie or if it removes its signature form the webpage...

...
if this is about potential logout function???.. thers lots of stuff on the forum:
http://rejetto.com/forum/index.php?action=search2;params=YWR2YW5jZWR8J3wwfCJ8YnJkfCd8MjEsMzYsMjIsMzcsMjgsMjQsMzQsMjcsMzMsMiwzLDIwLDE2LDE1LDIzLDEyLDEzfCJ8c2hvd19jb21wbGV0ZXwnfHwifHN1YmplY3Rfb25seXwnfHwifHNvcnR8J3xyZWxldmFuY2V8Inxzb3J0X2RpcnwnfGRlc2N8InxzZWFyY2h8J3xsb2dvdXQ=

http://rejetto.com/forum/index.php?pretty;board=hfs-~-http-file-server;topic=hfs-logout.0
http://rejetto.com/forum/index.php?topic=6855.msg1061486#msg1061486

(lost on the forum some wher :/ )
*Looking for 2 specifc posts...
i remember a breakdown and code examples with another user, myself, rejetto chimed in.. in witch we thought reverse logic for logout might work, talking about logout and and anothe post regarding the cookie ssid

And then there was a with hfs for someone regarding basic cockie creation.. issue with it, in itch mars had info and code regarding the cookie (and its recreations/deletion)
Some other links:
http://rejetto.com/forum/index.php?topic=11558.0
http://rejetto.com/forum/index.php?topic=11489.msg1059657#msg1059657
http://rejetto.com/forum/index.php?topic=11705.msg1061000#msg1061000
http://rejetto.com/forum/index.php?topic=11751.msg1061334#msg1061334

9
Pусский / Re: Вопросы по HFS
« on: August 27, 2018, 08:05:41 PM »
google translate :\



it in the hfs menu

http://www.rejetto.com/wiki/index.php/HFS:_IP_masks

ip mask

To exclude an IP, put a backslash \ before it:

so i want to allow only ip 192.168.1.254
i would have a mask of "\192.168.1.254"

and to ban all other ip i would have a mask of ???
i asume " *.*.*.* " 

see pictures

Гугл переводчик :/

это в меню hfs

http://www.rejetto.com/wiki/index.php/HFS:_IP_masks

ip-маска

Чтобы исключить IP, поместите обратную косую черту \ перед ней:

поэтому я хочу разрешить только ip 192.168.1.254
у меня была бы маска "\ 192.168.1.254"

и запретить все другие ip у меня будет маска ???
i asume "*. *. *. *"

см. фотографии
Gugl perevodchik :/

eto v menyu hfs

http://www.rejetto.com/wiki/index.php/HFS:_IP_masks

ip-maska

Chtoby isklyuchit' IP, pomestite obratnuyu kosuyu chertu \ pered ney:

poetomu ya khochu razreshit' tol'ko ip 192.168.1.254
u menya byla by maska "\ 192.168.1.254"

i zapretit' vse drugiye ip u menya budet maska ???
i asume "*. *. *. *"

sm. fotografii

10
HTML & templates / Re: Simple contact template
« on: August 27, 2018, 08:03:06 PM »
@Leo,

I believe i have enough info no on how to write the correct content to a text file for a true el structure...
The original eml file you have in your original post was missing JavaScript variables, and in the end would not work after code fixes and changes I made, before I started the validation implementation.

I was having a hard time finding a good true example to put the data together, as i find the macro write for this to be a tad easier then the xml post, ill re edit the eml after i change things around and fix what i have on my end. at that point, i'm will to leave it alone, (Because now i know what i'm trying to write/put data content together :p )

thank you for the clarification and example file i have here:

https://www.online-convert.com/file-format/eml

file: https://cdn.online-convert.com/example-file/document/eml/example.eml

Code: [Select]
Return-Path: <time2talk@online-convert.com>
X-Original-To: time2help@online-convert.com
Delivered-To: time2help@online-convert.com
Received: from vwp0096.webpack.hosteurope.de (vwp0096.webpack.hosteurope.de [87.230.60.103])
by tectrend.de (Postfix) with ESMTPS id AFFC171C0091
for <time2help@online-convert.com>; Wed, 17 Feb 2016 08:11:25 +0100 (CET)
Received: from p549a9204.dip0.t-ipconnect.de ([84.154.146.4] helo=[192.168.2.107]); authenticated
by vwp0096.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
id 1aVwGj-0002PO-95; Wed, 17 Feb 2016 08:11:25 +0100
From: Online-Convert.com <time2talk@online-convert.com>
Subject: =?UTF-8?Q?_EML Example File?=
References: <time2talk@online-convert.com>
To: Online-Convert.com <time2help@online-convert.com>
Message-ID: <56C41D18.3060102@online-convert.com>
Date: Wed, 17 Feb 2016 08:11:20 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <1SOLws-0BH0K00@online-convert.com>
Content-Type: multipart/alternative;
 boundary="------------050008080707050500070109"
X-bounce-key: webpack.hosteurope.de;time2talk@online-convert.com;1455693085;1ff5b968;

This is a multi-part message in MIME format.
--------------050008080707050500070109
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit

**
EML test file
Purpose: Provide example of this file type
Document file type: EML
Version: 1.0
Remark:

Example content:
The names "John Doe" for males, "Jane Doe" or "Jane Roe" for females, or "Jonnie Doe" and "Janie Doe" for children, or just "Doe" non-gender-specifically are used as placeholder names for a party whose true identity is unknown or must be withheld in a legal action, case, or discussion. The names are also used to refer to acorpse or hospital patient whose identity is unknown. This practice is widely used in the United States and Canada, but is rarely used in other English-speaking countries including the United Kingdom itself, from where the use of "John Doe" in a legal context originates. The names Joe Bloggs or John Smith are used in the UK instead, as well as in Australia and New Zealand.

John Doe is sometimes used to refer to a typical male in other contexts as well, in a similar manner to John Q. Public, known in Great Britain as Joe Public, John Smith or Joe Bloggs. For example, the first name listed on a form is often John Doe, along with a fictional address or other fictional information to provide an example of how to fill in the form. The name is also used frequently in popular culture, for example in the Frank Capra film Meet John Doe. John Doe was also the name of a 2002 American television series.

Similarly, a child or baby whose identity is unknown may be referred to as Baby Doe. A notorious murder case in Kansas City, Missouri, referred to the baby victim as Precious Doe. Other unidentified female murder victims are Cali Doe and Princess Doe. Additional persons may be called James Doe, Judy Doe, etc. However, to avoid possible confusion, if two anonymous or unknown parties are cited in a specific case or action, the surnames Doe and Roe may be used simultaneously; for example, "John Doe v. Jane Roe". If several anonymous parties are referenced, they may simply be labelled John Doe #1, John Doe #2, etc. (the U.S. Operation Delego cited 21 (numbered) "John Doe"s) or labelled with other variants of Doe / Roe / Poe / etc. Other early alternatives such as John Stiles and Richard Miles are now rarely used, and Mary Major has been used in some American federal cases.



File created by http://www.online-convert.com
More example files: http://www.online-convert.com/file-type
Text of Example content: Wikipedia (http://en.wikipedia.org/wiki/John_Doe)
License: Attribution-ShareAlike 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/)

Feel free to use and share the file according to the license above.




--------------050008080707050500070109
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font style="font-family: arial,helvetica,sans-serif;" size="2"> </font><b><font
        color="#660b23" face="Arial"> </font></b> <font
      style="font-family: arial,helvetica,sans-serif;" size="2">
      <div style="POSITION: relative">
<h2>EML test file</h2>
Purpose: Provide example of this file type<br>
Document file type: EML<br>
Version: 1.0<br>
Remark:<br><br>

Example content:<br>
The names "<b>John Doe</b>" for males, "<b>Jane Doe</b>" or "<b>Jane Roe</b>" for females, or "Jonnie Doe" and "Janie Doe" for children, or just "Doe" non-gender-specifically are used as placeholder names for a party whose true identity is unknown or must be withheld in a legal action, case, or discussion. The names are also used to refer to acorpse or hospital patient whose identity is unknown. This practice is widely used in the United States and Canada, but is rarely used in other English-speaking countries including the United Kingdom itself, from where the use of "John Doe" in a legal context originates. The names Joe Bloggs or John Smith are used in the UK instead, as well as in Australia and New Zealand.
<br><br>
John Doe is sometimes used to refer to a typical male in other contexts as well, in a similar manner to John Q. Public, known in Great Britain as Joe Public, John Smith or Joe Bloggs. For example, the first name listed on a form is often John Doe, along with a fictional address or other fictional information to provide an example of how to fill in the form. The name is also used frequently in popular culture, for example in the Frank Capra film Meet John Doe. John Doe was also the name of a 2002 American television series.
<br><br>
Similarly, a child or baby whose identity is unknown may be referred to as Baby Doe. A notorious murder case in Kansas City, Missouri, referred to the baby victim as Precious Doe. Other unidentified female murder victims are Cali Doe and Princess Doe. Additional persons may be called James Doe, Judy Doe, etc. However, to avoid possible confusion, if two anonymous or unknown parties are cited in a specific case or action, the surnames Doe and Roe may be used simultaneously; for example, "John Doe v. Jane Roe". If several anonymous parties are referenced, they may simply be labelled John Doe #1, John Doe #2, etc. (the U.S. Operation Delego cited 21 (numbered) "John Doe"s) or labelled with other variants of Doe / Roe / Poe / etc. Other early alternatives such as John Stiles and Richard Miles are now rarely used, and Mary Major has been used in some American federal cases.
<br><br>


File created by <a href="http://www.online-convert.com" target="_blank">http://www.online-convert.com</a><br>
More example files: <a href="http://www.online-convert.com/file-type" target="_blank">http://www.online-convert.com/file-type</a><br>
Text of Example content: <a href="http://en.wikipedia.org/wiki/John_Doe" target="_blank">Wikipedia</a><br>
License: <a href="http://creativecommons.org/licenses/by-sa/3.0/" target="_blank">Attribution-ShareAlike 3.0 Unported</a><br><br>

Feel free to use and share the file according to the license above.<br>
          <br>
        </font><br>
        <br>
      </div>
    </font>
  </body>
</html>

--------------050008080707050500070109--

it looks like we will be construing a eml html webpage of sorts to fill in true header and message content. Now that i also have the uscert rf288 mimetype, i can look deeper into the bare min for the eml file and write constrution.

atm i will leave the code alone as i'm also on a curtent time crunch.

11
Pусский / Re: Вопросы по HFS
« on: August 25, 2018, 02:47:15 AM »
I'm not aware of a specific Russian only build. It is possible now to use the initiative and hfs to do a language transition to Russian.

Try the language specific board? http://rejetto.com/forum/index.php?board=39.0

@Leo would be better at potential explanation to a post of the language stuff as it is floating around.


As to security right mouse click the folder in hfs.
Properties
Access tab
Add account

*Folder auth access will then be required to access files.

12
Final code revision for form auth:

https://stackoverflow.com/questions/3079031/login-form-for-http-basic-auth

Code: [Select]
<!DOCTYPE html>
<!-- I should be in a VITURAL FOLDER! called AUTH -->
<html>
<head>
<meta charset=UTF-8 />
<meta name="viewport" content="width=device-width, initial-scale=1">
    <title>HFS Login Form</title>
<link rel="stylesheet" href="/?mode=section&id=style.css" type="text/css">
    <script type="text/javascript" src="/?mode=jquery"></script>
<link rel="shortcut icon" href="/favicon.ico">
<style class='trash-me'>
.onlyscript, button[onclick] { display:none; }
</style>
    <script>
    // this object will store some %symbols% in the javascript space, so that libs can read them
    HFS = { folder:'{.js encode|%folder%.}', number:%number%, paged:{.!option.paged.} };
    </script>
<script type="text/javascript" src="/?mode=section&id=lib.js"></script>
</head>

[box login]
<fieldset id='login'>
<legend><img src="/~img27"> {.!User.}</legend>
<center>
{.if| {.length|%user%.} |{:
            %user%
            {.if|{.can change pwd.} |
                <button onclick='changePwd.call(this)' style='font-size:x-small;'>{.!Change password.}</button>
            .}
            :}
            | <a href="~login">Login</a>
        .}
</center>
</fieldset>       

[lib.js|no log]
<script>
function changePwd() {
    ezprompt(this.innerHTML, {type:'password'}, function(s){
        if (s) ajax('changepwd', {'new':s}, getStdAjaxCB([
            "!{.!Password changed, you'll have to login again..}",
            '>~login'
        ]));
    });
}//changePwd
</script>

[]
<!-- Fix Permission to folder upload access (hfs macro) for login to authenticate may not be needed -->
{.set item|%folder%|add upload=@anyone.}

<!-- include css file here-->
    <style> /* below line is write to use google font online  */
@import url(http://fonts.googleapis.com/css?family=Ubuntu);
 
h2{
 background-color: #FEFFED;
 padding: 30px 35px;
 margin: -10px -50px;
 text-align:center;
 border-radius: 10px 10px 0 0;
}
 
hr{
 margin: 10px -50px;
 border: 0;
 border-top: 1px solid #ccc;
 margin-bottom: 40px;
}
 
div.container{
 width: 900px;
 height: 610px;
 margin:35px auto;
 font-family: 'Ubuntu', sans-serif;
}
 
div.main{
 width: 300px;
 padding: 10px 50px 25px;
 border: 2px solid gray;
 border-radius: 10px;
 font-family: raleway;
 float:left;
 margin-top:50px;
}
 
input[type=text],input[type=password]{
 width: 100%;
 height: 40px;
 padding: 5px;
 margin-bottom: 25px;
 margin-top: 5px;
 border: 2px solid #ccc;
 color: #4f4f4f;
 font-size: 16px;
 border-radius: 5px;
}

label{
 color: #464646;
 text-shadow: 0 1px 0 #fff;
 font-size: 14px;
 font-weight: bold;
}

center{
 font-size:32px;
}

.note{
 color:red;
}
 
.valid{
 color:green;
}

.back{
 text-decoration: none;
 border: 1px solid rgb(0, 143, 255);
 background-color: rgb(0, 214, 255);
 padding: 3px 20px;
 border-radius: 2px;
 color: black;
}
 
input[type=button]{
 font-size: 16px;
 background: linear-gradient(#ffbc00 5%, #ffdd7f 100%);
 border: 1px solid #e5a900;
 color: #4E4D4B;
 font-weight: bold;
 cursor: pointer;
 width: 100%;
 border-radius: 5px;
 padding: 10px 0;
 outline:none;
}
 
input[type=button]:hover{
 background: linear-gradient(#ffdd7f 5%, #ffbc00 100%);
}

.fugo{
 float:right;
} </style>

<!-- include javascript file here-->
    <script>

var attempt = 3; //Variable to count number of attempts

//Below function Executes on click of login button
function validate(){
var username = document.getElementById("username").value;
var password = document.getElementById("password").value;

if ( username == "" && password == ""){
alert ("Login successfully");
window.location = "/"; //redirecting to other page
return false;
}
else{
attempt --;//Decrementing by one
alert("You have left "+attempt+" attempt;");

//Disabling fields after 3 attempts
if( attempt == 0){
document.getElementById("username").disabled = true;
producePrompt('Disabled', 'uname-error', 'red');
document.getElementById("password").disabled = true;
producePrompt('Disabled', 'pw-error', 'red');
document.getElementById("login").disabled = true;
producePrompt('Disabled', 'submit-error', 'red');
return false;
}
}
}

function submitted() {
var name = document.getElementById("username").value
var pw = document.getElementById("password").value
var ip = %ip%
var path = AUTH
document.location = "http://"+"name"+":"+"password"+"@"+"ip"+"path";
return true
}
</script>
     

  <body>
<div class="container">
  <div class="main">
<h2>Login Form</h2><hr/>
<form id="form_id" method="post" name="myform">
  <label for="uname">User Name :</label></br>
  <input type="text" class="form-control" tabindex="1" placeholder="Please Enter Your Username" name="username" id="username" required /></br>
<span class='error-message' id='uname-error'></span>

  <label>Password :</label></br>
  <input type="password" class="form-control" tabindex="2" placeholder="Please Enter Your Password" name="password" id="password" required /></br>
<span class='error-message' id='pw-error'></span>

  <input type="button" name="Login" tabindex="3" class="btn btn-default" value="Login" id="submit" onsubmit="Submitted()"/>
  <!-- onclick="Validate()" -->
    <span class='error-message' id='submit-error'></span>

<!--    <label><input type="checkbox" checked="checked" name="remember"> Remember me </label> -->
<!-- <button type="button" class="cancelbtn">Cancel</button> <span class="psw">Forgot <a href="#">password?</a></span> -->
</form>
  </div>
</div>
</br>
<!-- Didi I work? -->
<p> User: %user% @ IP: %ip% </p>
<!-- HFS Built in via default template -->
<div id='panel'>
{.$box login.}
</div>

<!-- <script> $.ajax({
   'url': 'http://host.com/',
   //'otherSettings': 'othervalues',
   username: $("username").val(),
   password: $("password").val()
   },
   sucess: function(result) {
     alert('done');
   }
});
</script>
Ajax pass username and password via url example: admin:mysecret@127.0.0.1/AUTH
https://stackoverflow.com/questions/3079031/login-form-for-http-basic-auth
-->
 </body>
</html>

i see no advantage for HFS using a form over the default browser basic auth for login credentials.
*as to my knowdlge regardless of the webcode, hfs source code would need to be updated to improve or select auth encoding for login credentiasl. Base64(although encodeing via default broswer login auth is still concerdised clear text to packet sniffers...) Any form would be under the same issue with authentication. Stunnel would be required or other way to send credentials via a secure conections...

this is as far as i can take this code atm.

hfs default template has some base code along with jqurey and other with the html form code, it could be done, but it is beyond my codeing skills atm.

i recall a old hfs function that had the username and passwords in the url, probally pass login credentials via url as example:
username:password@IP/Folder
admin:mysecret@127.0.0.1/AUTH

Good luck with futher form code and login credentials stufff. :/

(as to your erro page nonstop reequest, as i agree a 404 error should stop, i see a faster / easier fix.)

add html header option to redirect page to a end page
A error404 vitural folder with a differnet template tap of a 404 picture. thus stoping the nostop error...

13
That uses a browser's built in (or not) basic auth pop-up login box.  Support for that is diminishing.  We need an html login form instead. 

I think it would be elegant to add a real html login form into the error handler [unauthorized] section, because it is the default landing page for all browsers that don't have a basic auth login box built in.  So, then, instead of a nonstop error, you'd just log in (with a real login form).  It is very nice when error pages actually solve errors.  However, still need that login form. 
Code for it should probably have form and post tags.

So I'm looking into this more and more,  and getting a bit more Info to attempt to begin codeing and testing this form login page...

Login form for HFS...
website key notes and code sources:

http://blog.stevensanderson.com/2008/08/25/using-the-browsers-native-login-prompt/
https://www.w3schools.com/howto/howto_css_login_form.asp
https://www.formget.com/javascript-login-form/
HFS default template...
?raybob script for filezilla
?stunnel for security? ...

Looks like it will be a basic form page with Passing macro credentials of the users to hfs.

Rayboy; Has some similar code from fhfs for filezilla...

ATM, it looks like there will be a need for a basic stunnel config as regardless of encoding, it still clear text over the internet....

////////////////////////////////////////
ATM , But not finding a good solution/way to parse that to hfs for the ability to login nor pas its credentials?

Mars/Rejeto might have some answer/Clues.
*(may even have to have a special link hard coded to hfs (but this may become insecure/ create a vulnerability...

So, here is a sample of that code (still writing and some what untested, but to show you what i have atm:

Code will uses basic browser form to pass authentication ... ATM still using hfs default template code and login link...

Working form, but no parse macro code atm...:

Code: [Select]

<!DOCTYPE html>
<!-- I should be in a VITURAL FOLDER! called AUTH -->
<html>
<head>
<meta charset=UTF-8 />
<meta name="viewport" content="width=device-width, initial-scale=1">
    <title>HFS Login Form</title>
<link rel="stylesheet" href="/?mode=section&id=style.css" type="text/css">
    <script type="text/javascript" src="/?mode=jquery"></script>
<link rel="shortcut icon" href="/favicon.ico">
<style class='trash-me'>
.onlyscript, button[onclick] { display:none; }
</style>
    <script>
    // this object will store some %symbols% in the javascript space, so that libs can read them
    HFS = { folder:'{.js encode|%folder%.}', number:%number%, paged:{.!option.paged.} };
    </script>
<script type="text/javascript" src="/?mode=section&id=lib.js"></script>
</head>

[box login]
<fieldset id='login'>
<legend><img src="/~img27"> {.!User.}</legend>
<center>
{.if| {.length|%user%.} |{:
            %user%
            {.if|{.can change pwd.} |
                <button onclick='changePwd.call(this)' style='font-size:x-small;'>{.!Change password.}</button>
            .}
            :}
            | <a href="~login">Login</a>
        .}
</center>
</fieldset>       

[lib.js|no log]
<script>
function changePwd() {
    ezprompt(this.innerHTML, {type:'password'}, function(s){
        if (s) ajax('changepwd', {'new':s}, getStdAjaxCB([
            "!{.!Password changed, you'll have to login again..}",
            '>~login'
        ]));
    });
}//changePwd
</script>

[]
<!-- Fix Permission to folder upload access (hfs macro) for login to authenticate may not be needed -->
{.set item|%folder%|add upload=@anyone.}

<!-- include css file here-->
    <style> /* below line is write to use google font online  */
@import url(http://fonts.googleapis.com/css?family=Ubuntu);
 
h2{
 background-color: #FEFFED;
 padding: 30px 35px;
 margin: -10px -50px;
 text-align:center;
 border-radius: 10px 10px 0 0;
}
 
hr{
 margin: 10px -50px;
 border: 0;
 border-top: 1px solid #ccc;
 margin-bottom: 40px;
}
 
div.container{
 width: 900px;
 height: 610px;
 margin:35px auto;
 font-family: 'Ubuntu', sans-serif;
}
 
div.main{
 width: 300px;
 padding: 10px 50px 25px;
 border: 2px solid gray;
 border-radius: 10px;
 font-family: raleway;
 float:left;
 margin-top:50px;
}
 
input[type=text],input[type=password]{
 width: 100%;
 height: 40px;
 padding: 5px;
 margin-bottom: 25px;
 margin-top: 5px;
 border: 2px solid #ccc;
 color: #4f4f4f;
 font-size: 16px;
 border-radius: 5px;
}

label{
 color: #464646;
 text-shadow: 0 1px 0 #fff;
 font-size: 14px;
 font-weight: bold;
}

center{
 font-size:32px;
}

.note{
 color:red;
}
 
.valid{
 color:green;
}

.back{
 text-decoration: none;
 border: 1px solid rgb(0, 143, 255);
 background-color: rgb(0, 214, 255);
 padding: 3px 20px;
 border-radius: 2px;
 color: black;
}
 
input[type=button]{
 font-size: 16px;
 background: linear-gradient(#ffbc00 5%, #ffdd7f 100%);
 border: 1px solid #e5a900;
 color: #4E4D4B;
 font-weight: bold;
 cursor: pointer;
 width: 100%;
 border-radius: 5px;
 padding: 10px 0;
 outline:none;
}
 
input[type=button]:hover{
 background: linear-gradient(#ffdd7f 5%, #ffbc00 100%);
}

.fugo{
 float:right;
} </style>

<!-- include javascript file here-->
    <script>

var attempt = 3; //Variable to count number of attempts

//Below function Executes on click of login button
function validate(){
var username = document.getElementById("username").value;
var password = document.getElementById("password").value;

if ( username == "" && password == ""){
alert ("Login successfully");
window.location = "/"; //redirecting to other page
return false;
}
else{
attempt --;//Decrementing by one
alert("You have left "+attempt+" attempt;");

//Disabling fields after 3 attempts
if( attempt == 0){
document.getElementById("username").disabled = true;
producePrompt('Disabled', 'uname-error', 'red');
document.getElementById("password").disabled = true;
producePrompt('Disabled', 'pw-error', 'red');
document.getElementById("login").disabled = true;
producePrompt('Disabled', 'submit-error', 'red');
return false;
}
}
}
</script>
     

  <body>
<div class="container">
  <div class="main">
<h2>Login Form</h2><hr/>
<form id="form_id" method="post" name="myform">
  <label for="uname">User Name :</label></br>
  <input type="text" class="form-control" tabindex="1" placeholder="Please Enter Your Username" name="username" id="username" required /></br>
<span class='error-message' id='uname-error'></span>

  <label>Password :</label></br>
  <input type="password" class="form-control" tabindex="2" placeholder="Please Enter Your Password" name="password" id="password" required /></br>
<span class='error-message' id='pw-error'></span>

  <input type="button" name="Login" tabindex="3" class="btn btn-default" value="Login" id="submit" onclick="validate()"/>
    <span class='error-message' id='submit-error'></span>

<!--    <label><input type="checkbox" checked="checked" name="remember"> Remember me </label> -->
<!-- <button type="button" class="cancelbtn">Cancel</button> <span class="psw">Forgot <a href="#">password?</a></span> -->
</form>
  </div>
</div>
</br>
<!-- Didi I work? -->
<p> User: %user% @ IP: %ip% </p>
<!-- HFS Built in via default template -->
<div id='panel'>
{.$box login.}
</div>

 </body>
</html>

actual code is still a mess atm...

I still need hfs info suchas a link/symbol to pass code into. NOT a easy task nor a simple thing to do.

15
@DJ: It looks like the 'forEach' function is not recognized. I've tested several not-so-updated browsers:

In Chrome 31 (old version), the console shows this error:
Code: [Select]
Uncaught TypeError: Object #<NodeList> has no method 'forEach' (index):130
In Firefox 24 ESR (old version), the console shows this error:
Code: [Select]
TypeError: document.querySelectorAll(...).forEach is not a function
In Firefox (another old version), the console shows this error:
Code: [Select]
Error: document.querySelectorAll(".option_button").forEach is not a function
In KMeleon (an old fork of Firefox), the console shows this error:
Code: [Select]
Error: TypeError: document.querySelectorAll(...).forEach is not a function
On QtWeb (an old fork of Chrome), the console shows this error:
Code: [Select]
TypeError: 'undefined' is not a function (evaluating 'document.querySelectorAll(".option_button").forEach(function(o){o.onclick=function(){window.alert(o.value)}})')
Differences:

In Throwback7rev2.tpl there is no modal dialog at all (and the 'Uncaught TypeError' shows up on the console only once, when loading the page).

In Throwback7rev2.2.tpl the modal dialog shows up, but the file doesn't get deleted (it asks: 'Delete filename.xxx?', but when clicking on 'OK' the 'Uncaught TypeError' shows up again on the console (this error also appears when loading the page).

It would be great if we can use another function compatible with those browsers. I'm not expert on these matters, but perhaps using for loop instead of forEach, could solve this problem (or else using another methods). ???

or setup if statement to check if it can run then run if it can
https://www.w3.org/community/webed/wiki/Optimizing_content_for_different_browsers:_the_RIGHT_way

Why feature detection is better
Feature detection is a much better way to do things — instead of seeing what browser is accessing the content and serving appropriate code, the idea here is to query the browser to detect whether it supports the features our content relies on, and then serve content as appropriate. Let's take HTML5 video as an example. You could detect support using some simple code such as this:

javascript code:
Code: [Select]
if(!!document.createElement('video').canPlayType === true) {
  // run some code that relies on HTML5 video
} else {
  // do something else
}

This is much more future proof, because existing browsers that support HTML5 video will run the correct code, and future browsers that support HTML5 video will do as well. You don't have to keep updating your code each time a new browser is released.

Pages: [1] 2 3 ... 53