kartik-v / yii2-tree-manager

An advanced tree management module using nested sets for Yii 2.
http://demos.krajee.com/tree-manager
Other
150 stars 107 forks source link

Enhance data hashing and security via a separate helper #205

Closed buttflattery closed 5 years ago

buttflattery commented 6 years ago

Prerequisites

Steps to reproduce the issue

1.Install extension 2.customize the view 3.Update the extension to the latest release

Expected behavior and actual behavior

On an update to the latest release, the new $dataToHash which consist of the several items including the new attributes that were recently added like nodeTitle and nodeTitlePlural should be adjusted accordingly

Actual Behaviour

It throws exception as the signatures dont match and i have to manually copy the new attributes and place them at the exact place they are added in the extensions yii2-tree-manager/views/_form.php file.

Invalid request signature detected during tree data manage action! Please refresh the page and retry.

OLD HASH: 94461115ae4caa395ace47710903879d4ed8665964bb586a226907cefb94d39acommon\models\Campaign111/manage-campaigns@backend/views/campaign/_formnodenodes{"id":"w0-nodeform"}{"1":"","2":"","3":"","4":"","5":""}{"submit":"","reset":" "}"none"{"activeCss":"active","depth":"","glue":" » ","untitled":"Untitled"} NEW HASH: 3657c070219bec63de1ae8fa39fd1ed212d64816db4d6a4675314f8cd7b31470common\models\Campaign111/manage-campaigns@backend/views/campaign/_formw0-nodeselnodenodes{"id":"w0-nodeform"}{"1":"","2":"","3":"","4":"","5":""}{"submit":"","reset":" "}"none"{"activeCss":"active","depth":"","glue":" » ","untitled":"Untitled"}

Is there a possibility that we convert this form into a widget rather than a view so that the defaults like $dataToHash are automatically adjusted on update if there are additions to it? or maybe anyother way to fix this problem.

Environment

Yii 2.0.15.1 Ubuntu 14.04 Php 7.2

Browsers

Operating System

Libraries

Isolating the problem

kartik-v commented 5 years ago

This will be enhanced in the upcoming release.