This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Password Protected Directories For Windows
#1
Password Protected Directories For Windows
Dont know how many people are interested in it, but i have got the password protected directories module running on windows. Only required a few modifications to the module to get it working fully.

The things that were preventing the module from running properly:
File: controller.ext.php
Line: 415
Issue: The if statement is checking if the user is staying in there home directory, only issue is that linux path separators are not being converted to windows
Before: if( 0 !== strpos($realPath, self::getHostDir() . self::getCurrentUsername() . '/'))
After: if( 0 !== strpos($realPath, realpath(self::getHostDir() . self::getCurrentUsername() . '/')))

File: controller.ext.php
Line: 424 & 849
Issue: The method of encrypting the password that is used does not work on windows. We fix it by adding a method to the bottom of the code that works on all platforms and replacing the calls to crypt.
Before: $encryptedPassword = crypt($password, base64_encode($password));
After: $encryptedPassword = self::crypt_apr1_md5($password);

After these changes i was able to create, delete, as well as modify users as well as the actual password files.

To install just download my already modified zip, run the SQL script in phpmyadmin on the sentora_core database to create the required tables, and install the module zpp.


Attached Files
.zip   protected_directories.zip (Size: 11.31 KB / Downloads: 38)
Reply
Thanks given by: TGates , xtec
#2
RE: Password Protected Directories For Windows
Nice work! Will test this out.
-TGates - Project Council

SEARCH the Forums or read theĀ DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#3
RE: Password Protected Directories For Windows
(04-09-2015, 12:26 PM)VeryCrushed Wrote: Dont know how many people are interested in it, but i have got the password protected directories module running on windows. Only required a few modifications to the module to get it working fully.

The things that were preventing the module from running properly:
File: controller.ext.php
Line: 415
Issue: The if statement is checking if the user is staying in there home directory, only issue is that linux path separators are not being converted to windows
Before: if( 0 !== strpos($realPath, self::getHostDir() . self::getCurrentUsername() . '/'))
After: if( 0 !== strpos($realPath, realpath(self::getHostDir() . self::getCurrentUsername() . '/')))

File: controller.ext.php
Line: 424 & 849
Issue: The method of encrypting the password that is used does not work on windows. We fix it by adding a method to the bottom of the code that works on all platforms and replacing the calls to crypt.
Before: $encryptedPassword = crypt($password, base64_encode($password));
After: $encryptedPassword = self::crypt_apr1_md5($password);

After these changes i was able to create, delete, as well as modify users as well as the actual password files.

To install just download my already modified zip, run the SQL script in phpmyadmin on the sentora_core database to create the required tables, and install the module zpp.

It's Great!
I ruled out the module from Sentora for Windows.
This module is used in practice, only 1% of users hosting.
But anyway thank you very much !!!
This is a very valuable investment!
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Sentora for Windows 1.0.0 released! MarkDark 72 224 ,579 04-01-2022, 09:41 PM
Last Post: cathelest
ZPanel 10.1.1 -> Sentora 1.0.3 Windows Version TGates 20 58 ,194 09-30-2021, 09:36 PM
Last Post: cathelest
Sentora on Windows ANY NEW INSTALLER elmoutakaf 3 10 ,432 10-04-2020, 02:37 AM
Last Post: Gigamax

Forum Jump:


Users browsing this thread: 1 Guest(s)