[Koha-bugs] [Bug 23680] Perl string '0' evaluated as javascript boolean triggers window.close() when should not

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 3 13:35:07 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23680

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #93176|0                           |1
        is obsolete|                            |

--- Comment #7 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 93563
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93563&action=edit
Bug 23680: Incorrect conversion of Perl boolean to js

A Perl boolean value is on the server side converted
to a JS string (resulting in the values '0' or '1).
Since the string '0' is a truthy value in JS this
incorrectly triggers window.close() on the client
in many instances, for example when adding a new item.

To test:

1. Go to a bibliographic record in the staff client.
2. Expand the "New" menu and open "New item" in new tab.
3. The new tab will immediately close.
4. Apply the patch.
5. Perform steps 1-2 again.
6. The tab should now remain open.

Sponsored-by: Gothenburg University Library

Signed-off-by: David Nind <david at davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list