Security suggestion
Moderator: mkoch227
Security suggestion
Very Nice software; Powerful and yet simple to use! Great job!
I do have a request/suggestion: Security for us is a big issue! I would recommend 2 things:
1. Removing the dropdown menu from admin login and replace with text field.
2. Moving all the admin files to an admin folder! This way we can .htaccess the folder and increase security.
I do have a request/suggestion: Security for us is a big issue! I would recommend 2 things:
1. Removing the dropdown menu from admin login and replace with text field.
2. Moving all the admin files to an admin folder! This way we can .htaccess the folder and increase security.
1. You can remove this by changing lines 123-133 in admin.php (open in Notepad):
Chage to:
2. This is much more work, you can try yourself if you want. But rest assured no one can access any admin pages without providing a valid username and password. You could also additionally password protect individual files for example with htaccess:
http://www.google.com/search?hl=en&q=ht ... dual+files
Code: Select all
<td><select name="user">
<?php
$sql = "SELECT * FROM `hesk_users`";
$result = hesk_dbQuery($sql) or hesk_error("$hesklang[cant_sql]: $sql</p><p>$hesklang[mysql_said]:<br>".mysql_error()."</p><p>$hesklang[contact_webmsater] $hesk_settings[webmaster_mail]");
while ($row=hesk_dbFetchAssoc($result))
{
echo '<option value="'.$row['id'].'">'.$row['user'].'</option>';
}
?>
</select></td>
Code: Select all
<td><input type="text" name="user"></td>
http://www.google.com/search?hl=en&q=ht ... dual+files
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
No problem. Next version will definitely have an option added to remove or show the drop-down list of usernames. Not sure about moving files to "admin" folder, but it might be added as well.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
-
- Posts: 20
- Joined: Wed Jul 04, 2007 9:49 am
Ok, I tried this "fix" you posted, and noticied that this doesnt work atleast for version .94, as the values sql is looking for from the form is the actual id number, and the actual username of the user.
i had tested this by entering the corresponding user id, and password, and i was able to log in that way, but again not with the username.
Do you know of a quick and reliable fix for this?
Thanks.
Great script, I plan making a decent donation within a month or two when I finish up development on some other things.
i had tested this by entering the corresponding user id, and password, and i was able to log in that way, but again not with the username.
Do you know of a quick and reliable fix for this?
Thanks.
Great script, I plan making a decent donation within a month or two when I finish up development on some other things.
Behind every great fortune lies a crime.
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays
You should change the function do_login in admin.php
change this:
into something like this (not tested):
I didn't test this, but I think it should work. (might need to adjust the error message)
change this:
Code: Select all
function do_login() {
global $hesklang;
$user=hesk_isNumber($_POST['user'],$hesklang['select_username']);
$pass=hesk_input($_POST['pass'],$hesklang['enter_pass']);
$sql = "SELECT * FROM `hesk_users` WHERE `id`=$user LIMIT 1";
Code: Select all
function do_login() {
global $hesklang;
$user=hesk_input($_POST['user'],$hesklang['select_username']);
$pass=hesk_input($_POST['pass'],$hesklang['enter_pass']);
$sql = "SELECT * FROM `hesk_users` WHERE `user`=$user LIMIT 1";
-
- Posts: 20
- Joined: Wed Jul 04, 2007 9:49 am
that looks like it should work too, I am not even testing but agreeing, I just havent had time to play with it myself, i will do it later on this evening and report back.
Thanks.
Thanks.
Behind every great fortune lies a crime.
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays
-
- Posts: 20
- Joined: Wed Jul 04, 2007 9:49 am
Ok you are very right, thanks for pointing that out, its the untrained eye, as I have why I didn't realize the very minor mistake.
Here is the code you should copy to make it work:
I guess as you can see, I never applied it to my usage, I was quite busy myself. But a quick run down as to why it didnt work, was because since the username is now a string and not a numeric variable it needs to be enclosed in 'single quotes'
Cheers!
Here is the code you should copy to make it work:
Code: Select all
function do_login() {
global $hesklang;
$user=hesk_input($_POST['user'],$hesklang['select_username']);
$pass=hesk_input($_POST['pass'],$hesklang['enter_pass']);
$sql = "SELECT * FROM `hesk_users` WHERE `user`='$user' LIMIT 1";
Cheers!
Last edited by 3cwired_com on Thu Aug 02, 2007 10:28 pm, edited 1 time in total.
Behind every great fortune lies a crime.
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays
-
- Posts: 20
- Joined: Wed Jul 04, 2007 9:49 am
No problem it happens to the best of us! Look at all of these MS programs! 

Behind every great fortune lies a crime.
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays
Who said MS programs are written by the best



Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
-
- Posts: 20
- Joined: Wed Jul 04, 2007 9:49 am
yea that was the joke... they are not the best indeed.... 

Behind every great fortune lies a crime.
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays
[url]http://www.3cwired.com[/url] - Web Design/SEO/Repair/Sales/Upgrades
[url]http://www.galants.org[/url] - The Home for Galant Enthusiasts
[url]http://www.locatemyip.com[/url] - More than just free IP displays