First PHP 7.2 Test

Filed under PHP 7.2

Saturday
18.
November 2017

It seems that Flatpress with PHP 7.2 is coming to an end :(

Flatpress is using a deprecated PHP function within PHP 7.2. I don’t know how to fix it at present, but I will have a look.

Application Error Disclosure - HTML

Filed under PHP 7.1

Sunday
26.
March 2017

Application Error Disclosure

After a few OWASP Penetration tests an “Application Error Disclosure” error has occurred.

PHP Warning: Smarty error: validate: validator id ‘name’ is not registered. in …
PHP Warning: Smarty error: validate: validator id ‘email’ is not registered. in …
PHP Warning: Smarty error: validate: validator id ‘www’ is not registered. in …
PHP Warning: Smarty error: validate: validator id ‘content’ is not registered. in …

This Smarty Validate Class error should have been fixed since a few years, but were still contained.

HTML - Responsive web design (RWD)

If you want to make your Flatpress theme suitable for mobile devices and test against the NU HTML Validator, you get some errors.

Changed line 170 in /fp-includes/core/core.theme.php from

echo '<link media="screen,projection,handheld" href="';

to

echo '<link media="screen" href="';

Flatpress fulltext search warnings

Filed under PHP 7.1

Saturday
11.
March 2017

Remove a few warnings in the fulltext search. It seems to be an old bug, because it appears on older php versions with the same warning.

/search.php on line 88
Warning: Illegal string offset ‘fullparse’ in …
Warning: Cannot assign an empty string to a string offset in …
/search.php on line 91
Warning: Illegal string offset ‘fullparse’ in …
/search.php on line 116
Warning: Illegal string offset ‘fullparse’ in …
/search.php on line 119
Notice: Undefined index: content in …

PHP 7.1 - Adding security and Smarty Update

Filed under PHP 7.1

Saturday
25.
February 2017

Fixing a OWASP warning by adding a few lines to the defaults.php.

Defaults.php

//
// OWASP - Browser Cache - How can the browser cache be used in attacks?
//
header('Expires: Sun, 01 Jan 2015 00:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');
//
header('X-Frame-Options: SAMEORIGIN');
header('X-XSS-Protection: 1; mode=block');
header('X-Content-Type-Options: nosniff');
//
// End of send header
//

And next step updating the in Flatpress included Smarty Template Engine Version to get a bit more security.

Interesting Links

» Github - Smarty Template Engine project
» OWASP - Browser Cache - How can the browser cache be used in attacks?
» Stack Overflow - How to prevent Browser cache for php site

First PHP 7.1 patch

Filed under PHP 7.1

Wednesday
22.
February 2017

After the quick and dirty PHP 7.1 experiments a stable solution must be created. First of all, Flatpress should run again without disabling the error reporting.

Errors and Warnings with Flatpress 1.0.3 and PHP 5.6 patch under PHP 7.1:

fp-includes/smarty/Smarty.class.php on line 64

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty has a deprecated constructor in …

fp-includes/core/core.filesystem.php on line 12

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; fs_filelister has a deprecated constructor in …

fp-includes/core/core.filesystem.php on line 182

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; fs_chmodder has a deprecated constructor in …

fp-includes/core/core.cache.php on line 5

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; cache_filelister has a deprecated constructor in …

fp-includes/core/core.bplustree.class.php on line 186

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; pairs has a deprecated constructor in …

fp-includes/core/core.bplustree.class.php on line 373

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; BPlusTree_Node_Fifo has a deprecated constructor in …

fp-includes/core/core.bplustree.class.php on line 416

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; BPlusTree_Node has a deprecated constructor in …

fp-includes/core/core.bplustree.class.php on line 1472

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; BPlusTree has a deprecated constructor in …

fp-includes/core/core.bplustree.class.php on line 2341

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; BPlusWalker has a deprecated constructor in …

fp-includes/core/core.bplustree.class.php on line 2535

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SBPlusTree has a deprecated constructor in …

fp-includes/core/core.bplustree.class.php on line 2613

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; caching_SBPT has a deprecated constructor in …

fp-includes/core/core.widgets.php on line 9

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; widget_indexer has a deprecated constructor in …

fp-includes/core/core.comment.php on line 3

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; comment_indexer has a deprecated constructor in …

fp-includes/core/core.entry.php on line 3

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; entry_cached_index has a deprecated constructor in …

fp-includes/core/core.entry.php on line 36

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; entry_index has a deprecated constructor in …

fp-includes/core/core.entry.php on line 226

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; entry_archives has a deprecated constructor in …

fp-includes/core/core.draft.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; draft_indexer has a deprecated constructor in …

fp-includes/core/core.fpdb.class.php on line 3

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; FPDB_QueryParams has a deprecated constructor in …

fp-includes/core/core.fpdb.class.php on line 136

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; FPDB_Query has a deprecated constructor in …

fp-includes/core/core.fpdb.class.php on line 591

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; FPDB_CommentList has a deprecated constructor in …

fp-includes/core/core.fpdb.class.php on line 637

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; FPDB has a deprecated constructor in …

fp-includes/core/core.fpdb.class.php on line 765

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; FPDB_transaction has a deprecated constructor in …

fp-includes/core/core.plugins.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plugin_indexer has a deprecated constructor in …

fp-includes/smarty/SmartyValidate.class.php on line 33

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SmartyValidate has a deprecated constructor in …

fp-includes/smarty/Smarty_Compiler.class.php on line 35

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty_Compiler has a deprecated constructor in …

admin/includes/panels.prototypes.php on line 14

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; AdminPanel has a deprecated constructor in …

admin/includes/panels.prototypes.php on line 93

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; AdminPanelAction has a deprecated constructor in …

admin/panels/maintain/admin.maintain.php on line 17

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; tpl_deleter has a deprecated constructor in …

admin/panels/maintain/admin.maintain.php on line 39

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; s_entry_crawler has a deprecated constructor in …

admin/panels/themes/admin.themes.php on line 3

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; admin_themes has a deprecated constructor in …

admin/panels/themes/admin.themes.style.php on line 3

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; admin_themes_obj_style_idx has a deprecated constructor in …

fp-plugins/bbcode/inc/stringparser.class.php on line 66

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; StringParser has a deprecated constructor in …

fp-plugins/bbcode/inc/stringparser.class.php on line 838

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; StringParser_Node has a deprecated constructor in …

fp-plugins/bbcode/inc/stringparser.class.php on line 1453

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; StringParser_Node_Text has a deprecated constructor in …

After fixing this errors and warnings Flatpress now runs under PHP 7.1. But there are a few more things to do. I’m using two Flatpress plugins from Fabrixx.m.

  • LastCommentsAdmin
  • MediaManager

fp-plugins/lastcommentsadmin/plugin.lastcommentsadmin.php on line 41

Parse error: syntax error, unexpected ‘new’ (T_NEW) in …

fp-plugins/lastcommentsadmin/plugin.lastcommentsadmin.php on line 44

Parse error: syntax error, unexpected ‘new’ (T_NEW) in …

fp-plugins/lastcommentsadmin/plugin.lastcommentsadmin.php on line 15

Warning: Declaration of admin_plugin_lastcommentsadmin::onsubmit() should be compatible with AdminPanelAction::onsubmit($data = NULL) in …

fp-plugins/mediamanager/panels/panel.mediamanager.file.php on line 242

Warning: Declaration of admin_uploader_mediamanager::onsubmit() should be compatible with AdminPanelAction::onsubmit($data = NULL) in …

These two Flatpress plugins from Fabrixx.m are included in this first PHP 7.1 patch.

Link to Fabrixx.m
» http://kirgroup.com/fabrixxm/

Calendar

  • December 2018
    SunMonTueWedThuFriSat
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    3031 

Admin area

 

Top of Page