20 Commits

Author SHA1 Message Date
Fraenkiman
9837c76692 Hardens FlatPress via HTTP response header
Fixes #146

Can be optionally activated by the FlatPress admin

 * Content Security Policy is an effective measure to protect your site from XSS attacks. By whitelisting sources for approved content, you can prevent the browser from loading malicious content.
 * Permissions Policy is a new header that allows a site to control which features and APIs can be used in the browser.
 * HTTP Strict Transport Security is an excellent feature to support on your site and strengthens your implementation of TLS by getting the User Agent to enforce the use of HTTPS.
 * The X-Download-Options response header instructs the browser not to open the file directly but to offer it for download first. This mitigates some potential Social Engineering attacks.
 * HTTP Strict Transport Security (HSTS for short) is a security mechanism for HTTPS connections that protects against both connection encryption downgrade attack and session hijacking.
 * The referrer policy directive determines whether, and if so which, referrer information for requests triggered by the current web page is sent by the web browser in HTTP requests.
2023-03-01 00:59:25 +01:00
azett
ba6ce382a5 removed unnecessary line 2022-12-17 12:32:33 +01:00
azett
1c6b423e48 Updated Smarty to 4.3.0. And the FlatPress-specific Smarty plugins now have their own directory, represented by the new constant FP_SMARTYPLUGINS_DIR. 2022-12-11 13:30:29 +01:00
azett
430b3304a5 Smarty: update to 4.2.1 2022-10-08 13:51:33 +02:00
azett
c30d52b284 Merge branch 'master' of https://github.com/flatpressblog/flatpress into issue94_smartyupdate
# resolved conflicts:
#	fp-includes/smarty/plugins/function.html_select_date.php
2022-10-08 13:43:33 +02:00
azett
34fb2f3e6b HttpOnly flag for session cookie to prevent possible XSS - thx @melbinkm! 2022-10-01 14:07:54 +02:00
azett
a65285d31b Updated Smarty from 4.0.4 to 4.1.0 2022-04-10 12:55:40 +02:00
azett
52bf429a01 Replaced Smarty 2.6.31-dev with v 4.0.4, keeping the FP-specific Smarty plugins.
Updated calls to current Smarty API (register_function()/register_modifier()/register_block() -> registerPlugin(); assign_by_ref() -> assignByRef()).
Fixed file includes in templates with quotes.
Removed SmartyValidate.class.php includes.

Still work in progress as some errors still appear!
2022-01-23 15:02:33 +01:00
azett
e2a6bf1a8a Fixed security issue reported by huntr.dev: Session cookie missed the "secure" flag. Thanks for reporting! 2021-10-23 20:25:09 +02:00
azett
f265b22b0b Fix for #59: Updated password hash algorithm from md5 to bcrypt (via password_hash() function). Thanks a lot, @axelhahn!
In detail: Added function io_delete_file(). Removed system_hashsalt_save(). Added password hash update mechanics to user_login().
2020-12-19 14:02:27 +01:00
azett
6b8a4776df Included Matthias Mauch's PHP7.1 patch. Besides other changes regarding PHP7 compatibility, it replaces all the class-named constructors with __construct(). Thanks a lot, Matthias!
Please visit his website http://www.aadmm.org/fp-patch/ and read patch-description.txt to learn more about the details of the patch.

I adapted the patch slighty: It now does not just add a __construct() function to the existing class-named one, instead it replaces it completely. Therefore, some parent::__construct() calls had to be changed, too.
2018-10-03 11:00:55 +02:00
real_nowhereman
003f4b8e73 make file permissions user-defined 2011-06-21 08:32:00 +00:00
real_nowhereman
eccfec41ee porting to PHP5-style object assignments (it should work now...) 2009-07-23 15:19:06 +00:00
real_nowhereman
72880e6e16 congrats, we're back to this morning! :D (temporary workarounds) 2009-07-21 16:46:09 +00:00
real_nowhereman
06d15d67fd temporary fix for php5.3 2009-07-20 17:33:31 +00:00
real_nowhereman
5572be3b3c changed entry_cached_index, direct subclass... cache_filelister now probably useless; muted prev/next page for single; "last-entries" still broken; categories not tested yet 2008-09-08 08:25:20 +00:00
real_nowhereman
b3e97edd66 adding index manager, still probably not functional 2008-09-06 13:46:03 +00:00
real_nowhereman
ff3fe3cd0f you can now enjoy pathinfo URLs! set PRETTYURLS_PATHINFO to true in the plugin.prettyurls.php; if it'll work change was trivial (please report any strange issues, it involved altering defaults.php) 2008-04-11 19:27:05 +00:00
real_nowhereman
c0642e4f0f huge security commit, this should be an almost hassle-free hash salt: the salt is created on setup and then STORED in fp-content/config/hashsalt.conf.php
(you can change the name of the file from defaults.php); 

as salt is based on the path on the server, if you had to move to another directory or to another server, then you wouldn't be able to login anymore and you had to reinstall, now this shouldn't be needed anymore; moreover as this is now safe in a file we can add additional security by
* concatenating the default paths+random blog id to another random number, which is not written anywhere else
* changing the contents with your very own salt string: then re-run setup and overwrite your old user: the hashsalt won't be overwritten (this needs testing)
2008-02-10 14:20:09 +00:00
real_nowhereman
a68630bf35 First revision of FlatPress Crescendo+1 ( 0.703+n :) ) 2007-10-30 10:30:07 +00:00