Closed (cannot reproduce)
Project:
Protected Node
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 May 2012 at 10:32 UTC
Updated:
4 Dec 2013 at 13:23 UTC
Jump to comment: Most recent
Comments
Comment #1
luthien commentedI'm having the same problem, your solution works but as soon as a moderator updates the workflow status to Live, the pw failed.
Comment #2
bradspry commentedI'm having a very similar problem, your report clued me in...
Revisions are enabled on my content-type, save new revision every time. I am not using moderation.
What I have observed happening on new node creation, with password protection enabled:
1. I set password to 'brad'
2. resulting hash of the set password is rehashed and saved in database
Correct sha-1 hash for 'brad':
9233b6f5388d6867a2a7be14d8b4ba53c86cfde2
Correct sha-1 hash rehashed:
9fbbdf964200e6d49297bf5272349638b037cd2c
The original password's hash is being rehashed and stored in the database on initial node creation...
I'm reviewing the module's code in an effort to find where this might be happening.
UPDATE: I've disabled revisions on my content-type and the problem still persists. That should effectively eliminate revisions from the suspect list on my particular permutation of the issue...
UPDATE2: MySQL debug of new node creation shows initial sql INSERT with correct sha-1 hash followed immediately by sql UPDATE call containing incorrect hash... See above examples for comparison. The sql UPDATE call should not be happening on new node creation...
257 Query INSERT INTO protected_nodes (protected_node_is_protected, protected_node_passwd, protected_node_show_title, nid, protected_node_hint) VALUES (1, '9233b6f5388d6867a2a7be14d8b4ba53c86cfde2', 0, nid, '')
257 Query UPDATE protected_nodes SET protected_node_is_protected = 1, protected_node_passwd = '9fbbdf964200e6d49297bf5272349638b037cd2c', protected_node_show_title = 0, protected_node_hint = '' WHERE nid = nid
UPDATE3 - PROPOSED FIX PLEASE TEST:
Line 655
Before:
$node->protected_node_passwd = sha1($node->protected_node_passwd);
After:
$node->protected_node_passwd = $node->protected_node_passwd;
Works perfectly in my testing. Password is SHA-1'ed correctly on initial node creation, and SHA-1'ed correctly on subsequent saves.
Comment #3
izus commentedComment #4
grimreaperHello,
I just try to reproduce the issue with the last codebase, and I can't reproduce it.
I don't have problem with or without the revisions enabled from the creation of the content or enabled after the creation.
Comment #5
grimreaperchanging the status to postponed : maintainer needs more info
Comment #6
izus commentedcan't reproduce it too after testing