473,626 Members | 3,325 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FireFox 1.5 & clipboard access & controlling insert/overwrite mode

PMA
Hi all,

I am porting a web application from IE 6.0 to FireFox 1.5. I have
solved almost all compatibility issues (quite a lot but not too bad)
except two of them :

1) Clipboard access thru' JavaScript (programmatical copy and
paste actions)
2) Monitoring and driving Insert/Overwrite mode on input fields

Any help appreciated.

Philippe

Apr 13 '06 #1
12 6163
PMA said the following on 4/13/2006 6:04 AM:
Hi all,

I am porting a web application from IE 6.0 to FireFox 1.5. I have
solved almost all compatibility issues (quite a lot but not too bad)
except two of them :

1) Clipboard access thru' JavaScript (programmatical copy and
paste actions)
Can't programatically access the Clipboard in Firefox. It's an IE-only
security flaw - err - feature.
2) Monitoring and driving Insert/Overwrite mode on input fields


If memory serves me correctly, that can't be done in FF either.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 13 '06 #2
PMA
OK

Thanks

But why do you consider access to clipboard thru' JS is a sec flaw ? I
really wonder why ...

Apr 13 '06 #3
PMA wrote:
OK

Thanks

But why do you consider access to clipboard thru' JS is a sec flaw ? I
really wonder why ...


Many times the word security flaw is used, especially when no scenario
is described, it means annoyance. Nevertheless, in this particular
instance, it can lead to data loss for the user. Consider that you are
editing something in Word and you do a cut. Along comes a
window.setTimeo ut from an open browser which decides it wants to write
to the clipboard and, poof, you don't get back what you cut.

It might be that there is an option or security setting that allows you
to bypass this restriction (not sure on that). Also, if your app is
for an intranet where you can dictate requirements, then this is
possible if you can require your users to have an extension to Firefox,
such as GreaseMonkey.

Csaba Gabor from Vienna

Apr 13 '06 #4
Csaba Gabor wrote:
PMA wrote:
OK

Thanks

But why do you consider access to clipboard thru' JS is a sec flaw ? I
really wonder why ...
Many times the word security flaw is used, especially when no scenario
is described, it means annoyance. Nevertheless, in this particular
instance, it can lead to data loss for the user. Consider that you are
editing something in Word and you do a cut. Along comes a
window.setTimeo ut from an open browser which decides it wants to write
to the clipboard and, poof, you don't get back what you cut.


I would say that is one of the least serious problems.
What about a webapp in the background that send all clipboardconten t to some
badguy's server nonstop?

And I think we saw reasons enough last years to consider IE a security flaw
on it's own behalf, not to mention the time Microsoft needs to patch their
own shit and release the patch.
Regards,
Erwin Moller

It might be that there is an option or security setting that allows you
to bypass this restriction (not sure on that). Also, if your app is
for an intranet where you can dictate requirements, then this is
possible if you can require your users to have an extension to Firefox,
such as GreaseMonkey.

Csaba Gabor from Vienna


Apr 13 '06 #5
"Csaba Gabor" <da*****@gmail. com> writes:
Many times the word security flaw is used, especially when no scenario
is described, it means annoyance. Nevertheless, in this particular
instance, it can lead to data loss for the user.


It can also lead to compromise of secret data:
<URL:http://tom.me.uk/clipboard/>
Since I use an application for storing my passwords, I will have them
in the clipboard at times. Were I to have IE open on a malicious page
at the time, that password could be sent to the bad guy.

A simple example of what can get captured:
---
<textarea id="store" rows="50" cols="80"></textarea>
<script type="text/javascript">
(function loot() {
var store = document.getEle mentById("store ");
var last = "";
setInterval(
function(){
var now = window.clipboar dData.getData(" Text");
if (now != last) {
store.value += now;
last = now;
}
}, 250);
})()
</script>
---
Have this running in the background for a while and come back and see.
Then remember that this could all have been sent to somewhere using a
XMLHTTPRequest.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Apr 13 '06 #6
PMA
Gotcha,

However, when inside some intranet apps (in fact we are just using Web
technologies for making applications that are NOT connected to the
Internet and where security issues are monitored thru' a lot of
securities guys, anti virus, anti-spyware, anti-trojan anti-...,
firewalls (many, many, many of them) it is in a way strange that no
configuration is provided to release some features like the one I need
in FF.

Thanx
Philippe

Apr 13 '06 #7
PMA wrote:
Gotcha,

However, when inside some intranet apps (in fact we are just using Web
technologies for making applications that are NOT connected to the
Internet and where security issues are monitored thru' a lot of
securities guys, anti virus, anti-spyware, anti-trojan anti-...,
firewalls (many, many, many of them) it is in a way strange that no
configuration is provided to release some features like the one I need
in FF.
Well, you 3 options:

1) you can always code them yourself.
Firefox is an Open Source initiative after all.

2) Search for a plugin that enables clipboardmanipu lation.
Google for "plugin firefox clipboard"
Three link that might interest you:
http://extensionroom.mozdev.org/main.php/Firefox
https://addons.mozilla.org/extension...cation=firefox
http://www.quickonlinetips.com/archi...power-surfing/

I didn't check any of them myself, but I think that if you look into how the
plugins work, you can maybe make your own.
I am unsure if you can make a link to Javascript, as you asked in your
original question.

3) Or you can ask the developers of Firefox if they want to implement it.
It is technically not difficult.

Regards,
Erwin Moller


Thanx
Philippe


Apr 13 '06 #8

PMA wrote:
Hi all,

I am porting a web application from IE 6.0 to FireFox 1.5. I have
solved almost all compatibility issues (quite a lot but not too bad)
except two of them :

1) Clipboard access thru' JavaScript (programmatical copy and
paste actions)
2) Monitoring and driving Insert/Overwrite mode on input fields

Any help appreciated.

Philippe


Take a look at:-

<URL:http://xulplanet.com/references/xpcomref/group_Clipboard .html>
<URL:http://xulplanet.com/references/xpcomref/group_Selection .html>

Regards

Julian Turner

Apr 13 '06 #9
PMA
Thanx very much ...

I would not like to go to a specific dev for that feature. In a way I
prefer to "limit" the application users than telling IT departement
(there are not far from 15,000 users !) that they have to
"re-masterize" 15,000 Workstations ...

Best regards
Philippe

Apr 13 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
11461
by: LG | last post by:
Just have a question with regards to the clipboard, and how to read what other applications (Adobe InDesignCS) place in the clipboard. I am currently in the process of creating a booklet from a database, and I need the data to be laid out in a tabular format, and set out in a specific way. At the current point in time, I am copy/pasting the raw text from the database into a table layout in InDesign. What I was thinking is that if I could...
5
2685
by: TC | last post by:
Hello, I am familiar with obtaining source file reference material from the system clipboard using the old Win32 API. For example, copy an Excel chart onto the clipboard and goto Word. Under, Edit & PasteSpecial, there is a label called "Source:" which will contain the file path, etc. How can one obtain the source file reference material utilizing .Net
5
4326
by: tabonni | last post by:
Hello All I am creating an ASP page. There are a list of filename and checkbox next to it. When user checked all the documents they want and click ADD TO CLIPBOARD button. All filepaths will be copied into clipboard and then they can right-click -> paste into MS Outlook as attachments. How can I use clipboardData.setData function to do that? I saw a lot of examples they are just copy and paste text.
1
11360
by: johngilmer | last post by:
By default, when I type into a text box, it inserts the text into the existing text rather than overwriting the existing text. If I hit the "insert" key on my keyboard, it switches the mode to over-writing the text in the box. But when I refresh the page, it returns to inserting the text. I want my text boxes to be in the overwrite mode by default. Is there a way to do this in html or javascript. The solution only needs to work for IE....
10
17566
by: wayne | last post by:
I found the following script to copy text to the client clipboard but it is not working in Firefox (works fine in IE 6). Can anyone suggest what I need to change? ================================================= function copy_clip(mytext){ if (window.clipboardData) { // IE window.clipboardData.setData("Text", mytext);
0
1855
by: **Developer** | last post by:
I have a RichTextBox and I want to programmatically change the Insert/Overwrite mode. I tried the following but it doesn't appear to change the mode. Pressing the Insert or Ins key does change the mode. Any suggestions or verification?
1
2540
by: Francesc Guim Bernat | last post by:
Dear colleagues, i'm getting in troubles using one XML library with Visual Studio .NET and Xerces with Xalan. When i execute the code i get the next run time error: "Run-Time Check Failure #2 - Stack around the variable 'resolver' was corrupted." Looking on internet i've seen that the compiler, if you're running your
3
5538
by: Developer | last post by:
I use the RichTextBox and sometimes put it into overwrite mode. I'd like the cursor to show whether its in overwrite or insert mode. I often use Cursor.Current = Cursors.WaitCursor and therefore need to change the cursor to show the overwrite/insert mode in such a way that when the Cursor.Current is reset after the need for the wait cursor ends, the cursor resets to the overwrite cursor or insert cursor as appropriate.
1
5905
by: bogdanm | last post by:
Hello everyone, I am having a probleme with a issuu code when trying to insert it o my site it doesnt work in IE but in mozzila works fine the code is bellow: <div><object style="width:500px;height:300px" ><param name="movie"...
0
8266
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8199
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8705
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8365
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7196
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2626
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1511
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.