View Issue Details

IDProjectCategoryView StatusLast Update
1895RackTablesdefaultpublic2019-02-25 10:11
ReporterRackieAssigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
Product Version0.20.14 
Target VersionFixed in Version 
Summary1895: Problem with Rackcode verification
DescriptionThe problem is that upon trying to change permissions via UI from Main page : Configuration : Permissions : => Edit => Verify, the verification always returns ACK (except when the field is completely empty, for testing purposes).

Trying to change the permissions logged in as Admin. The problem started suddenly without any changes been made to the files, excluding secret.php where LDAP was enabled and tested to be working correctly. Basically the bug occurred out of the blue sky. What makes it interesting in my eyes is that
a) you can view the permissions via UI,
b) you can enter edit-mode for the permissions,
c) you can press verify for the exact same permissions that are already in, but it returns "ACK",
d) You can remove all text and just write "allow {$userid_1}" for only admin access, but it still gives ACK upon verification and doesn't let you save,
e) If you want, you can edit the permissions via MariaDB / SQL and they work as expected,
f) no other files have been modified within Racktables installation except for secret.php, but it shouldn't affect verification

Replication of the problem could be tried, but would probably require reinstallation of racktables. Is there a certain item in the verification process where this could be pointing at and be locally fixed (hopefully without having to reinstall RT)?
Additional InformationCentOS7, MariaDB, Racktables 0.20.14
Attached picture of simply the basic "allow {$userid_1}" giving the ACK error (logged in as Admin / RackTables Administrator) and keeping "Save" greyed out, aka fails the == / if -statement, problem in interface-config.php or ajax-interface.php? Rackcode.js seems to be working normally.

errore.jpg shows this problem
errori.jpg shows the already saved permissions, so those are stuck unless modified via SQL (as a workaround). Outruled comments from the picture with red.
TagsNo tags attached.

Activities

Rackie

Rackie

2019-02-22 14:51

reporter  

errore.JPG (54,639 bytes)
errore.JPG (54,639 bytes)
errori.JPG (82,401 bytes)
errori.JPG (82,401 bytes)
Rackie

Rackie

2019-02-22 14:59

reporter   ~0003909

Not important, but "for your information". Functions.php can also be ruled out IMO (lines 5147-5160), as that is what it is supposed to do when trying to run empty permissions, so problem shouldn't be there either: Runtime exception: Argument 'code' of value '' is invalid (parameter is an empty string).

errory.JPG (67,010 bytes)
errory.JPG (67,010 bytes)
infrastation

infrastation

2019-02-22 18:18

administrator   ~0003911

Thank you for the detailed report. "ACK" is expected to be the first line of the AJAX response and the visible message -- the second, but in this case "ACK" appears as the visible message, so it looks like there is an additional empty line prepended to the AJAX response. This is usually caused by an extra newline before "<?php" or after "?>" in secret.php (given all other files are exactly as they were in the tar.gz). You may need to view the file in a hex editor to confirm the placement of newlines and the absence of carriage returns.
Rackie

Rackie

2019-02-25 07:56

reporter   ~0003913

Hi,

Thank you for your swift and precise answer. The problem was as you said in one extra space after the "?>" in secret.php which had escaped. After the space was removed everything seems to be working as normal. Problem resolved.
infrastation

infrastation

2019-02-25 10:11

administrator   ~0003915

RackTables stopped adding the closing "?>" tag to secret.php at some point to avoid this exact problem. You can delete the closing tag from the file to avoid the same issue in future.

Issue History

Date Modified Username Field Change
2019-02-22 14:51 Rackie New Issue
2019-02-22 14:51 Rackie File Added: errore.JPG
2019-02-22 14:51 Rackie File Added: errori.JPG
2019-02-22 14:59 Rackie File Added: errory.JPG
2019-02-22 14:59 Rackie Note Added: 0003909
2019-02-22 18:18 infrastation Note Added: 0003911
2019-02-25 07:56 Rackie Note Added: 0003913
2019-02-25 10:11 infrastation Status new => closed
2019-02-25 10:11 infrastation Resolution open => no change required
2019-02-25 10:11 infrastation Description Updated View Revisions
2019-02-25 10:11 infrastation Additional Information Updated View Revisions
2019-02-25 10:11 infrastation Note Added: 0003915