分页: 1 / 1

navigator.clipboard.writeText

发表于 : 2024年 7月 25日 08:58
yylly
The bug occurs when

代码: 全选

navigator.clipboard.writeText
starts with a forward-slash:

_.png
_.png (19.22 KiB) 查看 2856 次

Instead of getting two forward slashes, a space, and the word "test" on my clipboard, I instead get a file protocol address copied to my clipboard.

I don't know how to speak Chinese. I tried to post this without an English explanation, but I got a rejection because it said there was a malware URL (there wasn't, it was just the file protocol URI).

I think this bug is occurring because there is some sort of workaround integrated into Catsxp to allow it to open files from your local filesystem.

Re: navigator.clipboard.writeText

发表于 : 2024年 7月 25日 14:19
catsxp
By default, it is not possible to call or access local files through JS

Re: navigator.clipboard.writeText

发表于 : 2024年 7月 26日 01:10
yylly
catsxp 写了: 2024年 7月 25日 14:19 By default, it is not possible to call or access local files through JS
Then that makes this bug all the more mysterious. I know it's not being caused by anything I've added to the browser, because I tried it in a brand new portable folder as well, completely default settings. Same issue.

This does not occur on any browser I've tried: Edge, Chrome, Firefox, etc.

Why is it happening? And will you please fix it?

Re: navigator.clipboard.writeText

发表于 : 2024年 7月 26日 05:13
yylly
I also got this strange error on a website I was authenticating with today:

_.png
_.png (3.82 KiB) 查看 2797 次

Re: navigator.clipboard.writeText

发表于 : 2024年 8月 26日 02:36
yylly
Even on the latest beta (128.0.6613.94), this is still an issue.

I'm almost certain it has to do with Catsxp having a "navigator" variable that's been modified in some way.

Re: navigator.clipboard.writeText

发表于 : 2024年 8月 26日 08:30
catsxp
The browser has disabled the navigator.clipboard object in non-secure domains. What are the safe URLs?
The security domains encompass local access and URLs secured with TLS authentication, like the HTTPS protocol at 127.0.0.1 or localhost.

Re: navigator.clipboard.writeText

发表于 : 2024年 9月 18日 01:34
yylly
catsxp 写了: 2024年 8月 26日 08:30 The browser has disabled the navigator.clipboard object in non-secure domains. What are the safe URLs?
The security domains encompass local access and URLs secured with TLS authentication, like the HTTPS protocol at 127.0.0.1 or localhost.
This is from http://127.0.0.1:8000/

Re: navigator.clipboard.writeText

发表于 : 2024年 10月 13日 22:51
yylly
I'm now on 4.10.3 and I tested to see if this bug was fixed yet.

Not sure when it happened, but the bug is now fixed! Thank you!