rejetto forum

User registration in HFS

0 Members and 1 Guest are viewing this topic.

Offline Chrisp6825

  • Occasional poster
  • *
    • Posts: 20
    • View Profile
I read around about registration and I know that it "can't be done right now, but it's in the to-do".
But I was wondering something...

I read in a post that the username and passwords in the hfs.ini were encoded in base64. (http://www.rejetto.com/forum/index.php?topic=5518.msg1032295#msg1032295)

And I've only glanced around in the default template, and notice you could use javascript...
Soo.. you should be able to write a script that reads the form input on a html page and converts it to base64.(http://www.webtoolkit.info/javascript-base64.html)
Then have it save it or append it to the hfs.ini.


What do you think? Would it be possible?


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
yes, it would be possible.(not sure if there is any security hard coded in for accessing or changing hfs.ini though)

I would create it like this.
the hfs.ini is basically one large strings table.

{.load|hfs.ini|data.}

{.save|hfs.ini|
active={.from table|data|active.}
only-1-instance={.from table|data|only-1-instance.}
...
accounts={.from table|data|accounts.}{.?new_user_and_pass.}|enabled:yes|no-limits:no|redir:;
.}


that is basic and not guaranteed to work.
I would also build in SECURITY because your hfs.ini is very vulnerable.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13517
    • View Profile
the ini is at the moment loaded at startup, and saved when you quit. (this may eventually change in the future)
This breaks your dreams, i'm sorry.
Registration is not exactly in to-do, because it alone would be useless, because you would have an account with no rigths granted.
But in my to-do-list there are 2 features that would give sense to a registration system.
+ option to let users access (upload?) a folder with their username
+ a way to give access/upload to any account


Offline Chrisp6825

  • Occasional poster
  • *
    • Posts: 20
    • View Profile
So the ini wouldn't update, is what your saying? Oh, ya that would break my idea of registration... haha

I know that it really isn't in the to-do since somewhere I read (I think in the faq) that HFS is essentially a file sharing server, not really a web hosting server. I just thought there could be a way around, even with security issues.

About the user rights thing, If you were planning to add the user registration possibility at all, people could set up a pre-set user rights thing that, when a user registers, there rights are defaulted to those pre-set ones.

But anyways, I just thought it would be a possible work-around but I guess not. I'll just get people to sign up through email or some kind of private shout box only I can read.

Thanks though guys.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13517
    • View Profile
Have you already thought of what rights you would give to such self-registered accounts?
I guess, since registration would be open to anyone, they would be rights you would grant to anyone.
Would it fit your needs?


Offline Chrisp6825

  • Occasional poster
  • *
    • Posts: 20
    • View Profile
Ya, I would give them access to view files in a set folder (website) then let them upload files to another set folder (website/uploads).
It would much easier to keep track of my viewers, and if I wanted to "upgrade" certain user's permissions, it would be a snap.
And, I would be able to get some kind of newsletter sent out to all my users.
Plus, it would open up the possibility of making the web browser based games. I've seen some people around here talking about that.

I had a lot of thoughts about this and what I would do if I could get it to work, but right now I'm pretty blank. Heh, it's too late for me to think.

If your considering to work on implementing it, it would help me a bunch.
Good luck on it. :)

PS.
I really like this program, by the way. It's help me out a TON when I have a large file I want to share. I can access my music library from my PSP at school, so I don't have to clutter up my memory sticks with music. I've been working on a website, and I've been working on some games for the PSP and this is the perfect solution to give people access to the games, fast and easy.
Other than the user registration, I would say this thing has everything I could ask for. (Except maybe server side scripting support)