-
Notifications
You must be signed in to change notification settings - Fork 796
Description
Describe the bug
Since v6.17, when pasting text into the Query Tool > Query panel, if that text produces the Trojan Source Warning (TSW), none of the text on the clipboard is pasted when clicking OK on the TSW popup window. In versions up to 6.16 you could click past the TSW and the text would be pasted into the Query panel fine. Opening a file containing the same text does cause the same TSW but the text in the file opens/renders fine (hence that is the workaround, and also indicates that this clipboard-paste behaviour for the same text is unexpected).
To Reproduce
Steps to reproduce the behavior:
- Copy text containing something that produces the TSW into the system clipboard. I am pasting the following text which contains Unicode special characters that are not rendered by normal text editors. The special characters are the codes:
- <0xa0> (I believe this is Unicode no-break space, per https://en.wikipedia.org/wiki/Non-breaking_space); and
- <0x200e> (I believe this is Unicode left-to-right mark, per https://en.wikipedia.org/wiki/Left-to-right_mark)
These appear either side of the كشميري text below (hence the actual text below includes E'कश्मीरी<0xa0>كشميري<0x200e>' if you type the special characters as ASCII character, which they are not, of course).
INSERT INTO myschema.language (id, name, iso_name, native_name, language_family, "iso_639-1", "iso_639-2T", "iso_639-2B", "iso_639-3", notes, is_available) VALUES (E'kas', E'Kashmiri', E'Kashmiri', E'कश्मीरी كشميري', E'Indo-European', E'ks', E'kas', E'kas', E'kas', DEFAULT, DEFAULT);
- Paste the text into the Query Tool > Query panel
- The TSW warning will appear. Click OK on that warning (since this isn't trojan source text)
- The pasted text will not appear in the Query panel
Expected behavior
The pasted text should appear in the query panel. This is not trojan source text - it is just text containing unicode special characters which we believe are required/intended.
Error message
There are not error messages other than the TSW popup. There is nothing that appears to be a relevant log in the macOS Console app at the time coinciding with the pasting or the TSW OK button click.
Screenshots
Screenshots aren't relevant since they would only show the TSW popup (whose content is generic) and an empty Query panel after clicking OK on the TSW.
Desktop (please complete the following information):
- OS: macOS 13.1
- Version: 6.17-6.19 (so far)
- Mode: Desktop
- Browser (if running in server mode): n/a
- Package type: macOS installer (Electron app)
Additional context
- I am not able to find any pgAdmin 4 preference/setting that allows the user to control what happen after TSW is displayed for clipboard text (eg controlling whether the text should be pasted or not).
- I am not able to find any documentation on the expected behaviour, or recent changes since 6.17, after the TSW has been displayed.
- I am not able to find any other commentary through a Google search around this change from 6.16 to 6.17 (and I haven't tried to find this change in the source code).
- Consequently, since it is new and limiting behaviour that doesn't appear to be controllable or clearly documented, it must be a bug