navigator.clipboard.writeText

您的反馈很重要!
回复
yylly
帖子: 22
注册时间: 2024年 7月 20日 00:40

navigator.clipboard.writeText

帖子 yylly »

The bug occurs when

代码: 全选

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

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

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.
上次由 yylly 在 2024年 7月 26日 02:27,总共编辑 1 次。
I only speak English. If you don't understand what I say, please tell me and I will find a friend who speaks Chinese and English to help me translate.

( 我只会说英语。如果你听不懂我说什么,请告诉我,我会找一个会说中文和英文的朋友帮我翻译。 )
头像
catsxp
网站管理员
帖子: 3607
注册时间: 2022年 12月 26日 17:41

Re: navigator.clipboard.writeText

帖子 catsxp »

By default, it is not possible to call or access local files through JS
yylly
帖子: 22
注册时间: 2024年 7月 20日 00:40

Re: navigator.clipboard.writeText

帖子 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?
上次由 yylly 在 2024年 7月 26日 01:42,总共编辑 1 次。
I only speak English. If you don't understand what I say, please tell me and I will find a friend who speaks Chinese and English to help me translate.

( 我只会说英语。如果你听不懂我说什么,请告诉我,我会找一个会说中文和英文的朋友帮我翻译。 )
yylly
帖子: 22
注册时间: 2024年 7月 20日 00:40

Re: navigator.clipboard.writeText

帖子 yylly »

I also got this strange error on a website I was authenticating with today:

_.png
_.png (3.82 KiB) 查看 2795 次
I only speak English. If you don't understand what I say, please tell me and I will find a friend who speaks Chinese and English to help me translate.

( 我只会说英语。如果你听不懂我说什么,请告诉我,我会找一个会说中文和英文的朋友帮我翻译。 )
yylly
帖子: 22
注册时间: 2024年 7月 20日 00:40

Re: navigator.clipboard.writeText

帖子 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.
I only speak English. If you don't understand what I say, please tell me and I will find a friend who speaks Chinese and English to help me translate.

( 我只会说英语。如果你听不懂我说什么,请告诉我,我会找一个会说中文和英文的朋友帮我翻译。 )
头像
catsxp
网站管理员
帖子: 3607
注册时间: 2022年 12月 26日 17:41

Re: navigator.clipboard.writeText

帖子 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.
yylly
帖子: 22
注册时间: 2024年 7月 20日 00:40

Re: navigator.clipboard.writeText

帖子 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/
I only speak English. If you don't understand what I say, please tell me and I will find a friend who speaks Chinese and English to help me translate.

( 我只会说英语。如果你听不懂我说什么,请告诉我,我会找一个会说中文和英文的朋友帮我翻译。 )
yylly
帖子: 22
注册时间: 2024年 7月 20日 00:40

Re: navigator.clipboard.writeText

帖子 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!
I only speak English. If you don't understand what I say, please tell me and I will find a friend who speaks Chinese and English to help me translate.

( 我只会说英语。如果你听不懂我说什么,请告诉我,我会找一个会说中文和英文的朋友帮我翻译。 )
回复