Closed
Bug 1477546
Opened 7 years ago
Closed 7 years ago
Enable right click and copy add-on breaks window `prompt` method
Categories
(WebExtensions :: Developer Outreach, defect)
Tracking
(Not tracked)
RESOLVED
INACTIVE
People
(Reporter: mirzababaei, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0
Build ID: 20180713213322
Firefox for Android
Steps to reproduce:
this code works when you click the button in IE, Edge, Chrome but says undefined in Firefox
<button onClick="NoRead();">No:</button>
<script>
function NoRead() { alert(prompt("Enter No","10")); }
</script>
Actual results:
undefined
Expected results:
10
Comment 1•7 years ago
|
||
Not a security bug. Did you mean to file a bug about Firefox for Android, or Firefox on desktop?
FWIW, I can't reproduce an issue with Firefox beta 62 on macOS.
Group: firefox-core-security
Flags: needinfo?(mirzababaei)
| Reporter | ||
Comment 2•7 years ago
|
||
Firefox Quantum 62.0b10 (64bit) running on a windows 10 and Sony Vaio F serie
the bug only shows when clicking on the button (running as callback function!)
result of the statement in regular is 10
but in a callback function is undefined!
alert(prompt("Enter No","10"));
this can change the values in banking transactions.
Flags: needinfo?(mirzababaei)
Comment 3•7 years ago
|
||
(In reply to mirzababaei@aut.ac.ir from comment #2)
> Firefox Quantum 62.0b10 (64bit) running on a windows 10 and Sony Vaio F serie
> the bug only shows when clicking on the button (running as callback
> function!)
>
> result of the statement in regular is 10
> but in a callback function is undefined!
> alert(prompt("Enter No","10"));
> this can change the values in banking transactions.
Can you link to a complete testcase where you're seeing this? Can you reproduce on a clean profile? ( https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles )
Component: Untriaged → DOM: Core & HTML
Flags: needinfo?(mirzababaei)
Product: Firefox → Core
Comment 4•7 years ago
|
||
Also, do you see the actual prompt dialog as expected?
| Reporter | ||
Comment 5•7 years ago
|
||
Thank you Mr. Gijs.
Cleaning the profile (as you instructed) guided me to omit the an addon named "Enable right click and copy".
Mentioned addon was the reason of the fault.
Flags: needinfo?(mirzababaei)
Comment 6•7 years ago
|
||
(In reply to mirzababaei@aut.ac.ir from comment #5)
> Thank you Mr. Gijs.
> Cleaning the profile (as you instructed) guided me to omit the an addon
> named "Enable right click and copy".
> Mentioned addon was the reason of the fault.
Oh, cool! Thanks for updating us. Yes, looking at the code in the add-on, it does this:
const original = {
preventDefault: Event.prototype.preventDefault,
alert: window.alert,
confirm: window.confirm,
prompt: window.prompt,
};
['alert', 'confirm', 'prompt'].forEach((prop) => {
window[prop] = function fn(...args) {
if (paused || !mouseRightButtonDown) {
original[prop].apply(this, args);
}
};
});
on every website. Note that even when it decides to allow calling the original methods, it doesn't return the result of that call to the caller. If it did, this bug wouldn't occur. I would suggest reporting this issue to the the developer of the add-on.
Andreas, can you check if the author of https://addons.mozilla.org/en-US/firefox/addon/enable-rightclick-and-copy/ has a bugzilla account and either needinfo them here adn/or email them? Thanks!
(I looked for a github repo for the add-on but didn't find one.)
Status: UNCONFIRMED → NEW
Component: DOM: Core & HTML → Add-ons
Ever confirmed: true
Flags: needinfo?(awagner)
Product: Core → Tech Evangelism
Summary: prompt → Enable right click and copy add-on breaks window `prompt` method
Version: 62 Branch → Firefox 62
Comment 7•7 years ago
|
||
There is a similar, but not exact match on the email address for a bugzilla account, so I reached out using the reviewer tools, pointing to this bug. Given the add-on was hasn't been updated in over a year, I am not sure how much traction it will get.
Flags: needinfo?(awagner)
Comment 8•7 years ago
|
||
There hasn't been any response, so the add-on has been rejected.
| Assignee | ||
Updated•7 years ago
|
Component: Add-ons → General
Product: Tech Evangelism → WebExtensions
Comment 9•7 years ago
|
||
Closing this as Inactive.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
Updated•7 years ago
|
Component: General → Developer Outreach
Updated•6 years ago
|
Version: Firefox 62 → 62 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•