Review main Merged

29095[BUGFIX] Improve the admin panel

Georg Ringer CR +2 V +2 Easy +22 −14 updated 04/14/14, 09:27

Commit message

There are 3 issues in the admin panel currently which slipped through.

* CSRF protection is not working in the FE even though
  there is a BE_USER provided
* Wrong title is used for the link of "record history" link
* Incorrect usage of htmlspecialchars-conversion
  (don't escape title for calls to getSpriteIcon, ...)

Review

  • Code review CR +2
    • Stefan Neufeind +2
    • Markus Klein +1
  • Verified V +2
    • Stefan Neufeind +2
    • Markus Klein +1

Issues 1

Files 2

Review log 36

Show 11 earlier messages
  1. Mr. Jenkins commented on patch set 1 04/02/14, 17:42

  2. Markus Klein voted on patch set 1 V +1 CR +1 04/02/14, 18:11

  3. Stefan Neufeind commented on patch set 1 V +1 CR -1 04/04/14, 11:38

    works. will push an extended version soon though
  4. Stefan Neufeind uploaded patch set 2 04/04/14, 12:03

  5. Stefan Neufeind commented on patch set 2 V +1 CR +1 04/04/14, 12:14

    Added cleanups for htmlspecialchars. Stumbled across a "Web>List" during review of this patch in the icons. If getSpriteIcon is called with a title, the title must not be specialchared before.
  6. Mr. Jenkins commented on patch set 2 04/04/14, 12:17

  7. Markus Klein voted on patch set 2 CR +1 04/11/14, 23:41

  8. Oliver Klee commented on patch set 2 04/12/14, 07:23

    AdminPanelView.php:614

    Why remove these calls to htmlspecialchars? AFAICS, this would also leave the ampersands unencoded.
  9. Stefan Neufeind commented on patch set 2 V -1 CR -1 04/12/14, 08:40

    AdminPanelView.php:614 Reply

    You are right. It's those in extGetLL that need to go
  10. Stefan Neufeind uploaded patch set 3 04/12/14, 08:46

  11. Mr. Jenkins commented on patch set 3 04/12/14, 08:59

  1. Markus Klein commented on patch set 3 V -1 CR -1 04/12/14, 09:33

    1) you reintroduced the bug that should have been fixed 2) Georg is still the author of the main changes So please go back to set 1 and change the hsc stuff there.

    AdminPanelView.php:598

    wrong again now: edit_recordHistory
  2. Stefan Neufeind uploaded patch set 5 04/12/14, 23:19

  3. Stefan Neufeind commented on patch set 5 04/12/14, 23:24

    Of course Georg is the main author. That slipped through when I worked locally with a patch-file, applied changes to the code and pushed it again without explicitly giving the author again. Went back to patchset 1 and just redid the htmlspecialchars()-things. Please check.
  4. Markus Klein commented on patch set 5 V +1 CR +1 04/12/14, 23:37

    AdminPanelView.php:657

    Just one idea. Should we introduce a second param telling the function whether it should hsc or not? currently he have 21 usuage where we need to add hsc(), but only 7 usages, where we don't need the hsc(). So if we add the param here, we only need to add 7 FALSE.
  5. Mr. Jenkins commented on patch set 5 04/12/14, 23:38

  6. Stefan Neufeind commented on patch set 5 04/13/14, 01:06

    AdminPanelView.php:657 Reply

    Thought about that as well. But then it would be more than just a "wrapper" for accessing the object from globals. And what would we call it to make sure that it (optionally!) allows hsc or even has hsc by default?!?
  7. Markus Klein commented on patch set 5 04/13/14, 01:11

    extGetLL($a, $hsc = TRUE) { $val = ...; if ($hsc) $val = hsc($val); return $val } so we only need to add the FALSE as second param to the 7 places
  8. Stefan Neufeind uploaded patch set 6 04/13/14, 08:58

  9. Stefan Neufeind commented on patch set 6 04/13/14, 09:00

    I don't really like that solution, since the name extGetLL imho says that the getLL-function is encapsulated and now we add a functionality that does not really belong into fetching a lable. Also we add a default-behaviour (TRUE) that I would not expect from a function for fetching labels. But I'll do as you please ...
  10. Markus Klein commented on patch set 6 04/13/14, 09:02

    Looks great now

    AdminPanelView.php:654

    two nitpicks: boolean -> bool lable -> label
  11. Stefan Neufeind uploaded patch set 7 04/13/14, 09:09

  12. Markus Klein commented on patch set 6 04/13/14, 09:09

    First, this was only a suggestion. No need to implement it. (I began my suggestion with the words "Just an idea:") Second, I don't see this as a plain wrapper, since it had the hsc before. So the default behavior does not even change. As I said, that was just an idea and I'm fine with either solution.
  13. Stefan Neufeind commented on patch set 7 04/13/14, 09:09

    It is "boolean" all over the place in that file. But okay ...
  14. Markus Klein voted on patch set 7 V +1 CR +1 04/13/14, 09:10

  15. Mr. Jenkins commented on patch set 6 04/13/14, 09:12

  16. Oliver Klee commented on patch set 7 04/13/14, 09:18

    That's because at some point we (the people at some ACME, IIRC) decided to use "bool" and "int" from that point on. :-)
  17. Mr. Jenkins commented on patch set 7 04/13/14, 09:22

  18. Stefan Neufeind commented on patch set 7 04/13/14, 09:33

    AdminPanelView.php:657

    let's make this "protected" before commit. It never was intended to have this publically available
  19. Stefan Neufeind voted on patch set 7 CR +1 04/13/14, 10:08

  20. Robert Vock commented on patch set 7 V +1 CR +1 04/14/14, 07:06

    I checked out PatchSet 7 and tested it. Looks good to me
  21. Markus Klein uploaded patch set 8 04/14/14, 09:13

  22. Markus Klein commented on patch set 8 V +1 CR +1 04/14/14, 09:15

    Fixed the protected and some other small issues. Let's get this merged.

    AdminPanelView.php:594

    $this->pageinfo does NOT exist as member and is never set anywhere in this class. So this looks like another bug.
  23. Stefan Neufeind voted on patch set 8 V +2 CR +2 04/14/14, 09:15

  24. Stefan Neufeind merged patch set 9 04/14/14, 09:15

  25. Mr. Jenkins commented on patch set 8 04/14/14, 09:27