-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FireMonkey]: Some observations for v1.5 #52
Comments
Not at all .. thank you for taking the time to look into it To start with, Firefox has postponed the official release of the new API to 68 (from 65) therefore as mentioned on the description, the API in FF65-67 requires:
FireFox API does not support RegEx matches and FireMonkey is adhering to Firefox API standard. You should have seen a red cross next to the script name to show it and there is a notification when clicking to show the script in the editor.
AFA button icon, they are ALL Unicode text and not icons per se. Their quality is not as great as proper icon but then the are scalable and added for extra context only. I have also explained all the buttons in the Help section. Please let me know if above was helpful. |
plus a restart of the browser. A typical way of end users disabling metadata block keys of: // @include /^https?://openuserjs\\.org(?::\\d{1,5})?/scripts//
// @include /^http://localhost(?::\\d{1,5})?/scripts// ... is to do this: //@include /^https?://openuserjs\\.org(?::\\d{1,5})?/scripts//
//@include /^http://localhost(?::\\d{1,5})?/scripts// ... which isn't working... Fx via your extension is still parsing it... which is incorrect spec for all .user.js engines including GM, GM Port, and TM. As I mentioned before your extension should probably parse the UserScript metadata block first then send it off to the Fx API. You'll encounter a lot of resistance from the diverse community on this one with people saying they won't do one engine or the other. Once I completely removed the lines then it injected. NOTE
Nice tip... Ctrl + + here I come! 😸
The X yes... I consider a cross to be ✝ but I'll add a mental note that you mean 🞮
Seem to be missing this part. Related to the editor at one point during the removal of the space between
Surprise, surprise 😸
Syncing up with my terminology... list filters ... would never have guessed that even with reading the Help. 😸 With all of the reports rolling in of one .user.js engine deleting scripts on import/export (and a very casual look without testing to confirm) I'm a bit leery to just go poking around these days in a "dirty" profile that I should back up more often. Script injection test nth test: // ==UserScript==
// @name oujs - Meta View
// @namespace https://openuserjs.org/users/Marti
// @description Adds a script navigation link next to `Source Code` titled `Meta` and opens a phantom url to show the detected metadata
// @copyright 2014+, Marti Martz (https://openuserjs.org/users/Marti)
// @license CC-BY-NC-SA-4.0; https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
// @license GPL-3.0-or-later; http://www.gnu.org/licenses/gpl-3.0.txt
// @version 4.4.5
// @icon https://www.gravatar.com/avatar/7ff58eb098c23feafa72e0b4cd13f396?r=G&s=48&default=identicon
// @homepageURL https://github.com/Martii/UserScripts/tree/master/src/oujs/Meta%20View
// @homepageURL https://openuserjs.org/scripts/marti/oujs_-_Meta_View
// @supportURL https://openuserjs.org/scripts/marti/oujs_-_Meta_View/issues
// @updateURL https://openuserjs.org/meta/Marti/oujs_-_Meta_View.meta.js
// @downloadURL https://openuserjs.org/install/Marti/oujs_-_Meta_View.min.user.js
// @include https://openuserjs.org/scripts/*/*
// @include http://localhost:8080/scripts/*/*
var x = 10; // *** This breaks script injection and should not ***
// @grant none
// ==/UserScript== ... result FAIL NOTE Btw Install button on OUJS still no workie. New Script "button" with one script already in there copies the source of oujs - Meta View? A little unusual. |
Please note that Regular Expression includes are not supported by the API eg: On the option page, when clicking on the script with X after it, it display the script and then.. it has a notification popup with the error plus the the edit area changes colour to show error After removing the RegEx include and enabling the script, the script runs but I dont know what it is supposed to do. On |
Never get that. Do get the pink background though.
That can be a security risk for starters not to mention a parsing nightmare.... the official spec for metadata blocks are at GM and the original spec of GM Port. Using a proprietary .user.js metadata block is not recommended since it makes it not a .user.js engine. The metadata is critical for parsing and busting that doesn't seem like a wise choice. I would suggest that changes in FireMonkey as it won't be endorsed as a .user.js engine until it does and won't be widely accepted in the community. Ex.
(Note: The ellipsis means there is more. This is just a snippet example) Anyhow... don't want to seem like I'm tilting towards the negative spectrum. The extension has good promise but need a few standardizations on the basics. 😄
Parses the metadata blocks that we collect (specifically how GM, GM Port, TM, VM, etc. do it)... click on "Meta" on the nav bar. Ref:
|
You should get it every time you click on the script with X on the left-side menu to display that script.
I beg to differ. The processing is quite different and are there safeguards. AFA this instance is concerned, it suffices to say that the space after Even the naming of If a programmer chooses to insert comment that mimics meta-block inside the meta-block, that displays the poor choice of the script writer. Similarly, bad code writing displays the poor choice of the script writer. There is no way for the non-programmer-users to check the code for poor implementation. IMHO, Such scripts should be avoided. The meta-block is not the place to have comments. That is simply poor and improper practice.
While GM, TM & VM are similar, there are implementation differences that causes some scripts to behave differently (some of these are mentioned in the Help). While adhering to good standards is an improvement, adhering to no-so-good standards are not. Some standards are created by the length of time they have been in use and not by their own merit. ;) Initially, I created FireMoneky for my own use as I wanted an alternative to the available user JS & CSS managers. I have released it for public use in the hope that some users might find it useful as an alternative, and not in competition with the established extensions. It goes without saying that upon feedback from the users, FireMonkey will be further improved in future. :)
FireMonkey converts some common incompatible patterns automatically. It is not possible to check or convert all such instances. In case of bad-matches, the script does not run and is automatically disabled and a warning is added to the script (as mentioned above). Such scripts are still imparted but do not run until the issue is fixed and then the script is then enabled. |
Actually it's excellent, and educated, coding to comment what things are when the url may be abstracted by a QSP/hash/etc. just as line breaks are. Again your opinion however not the communities.
I think that is where this extension fails because you haven't taken the time to consider the security ramifications of poor implementation of the UserScript metadata block. Perhaps you should reevaluate the lack of integrity of this decision?
Much like early Opera used to do... so not a new concept.
Again much like early Opera. And you finally answered the lingering observation, implied, question of why it doesn't work with OUJS Install button. Thank you.
Some people like the chaos theory better. As an individual who has been a systems administrator, engineer, and analyst most of my life I beg to contradict that persona. Clearly you want to open a security hole for the bad actors out there with your non-standardized implementation of the metadata block? Seems like a poor choice if so. Apologies but this is how it looks.
Saying this and proving it are different animals. I'll reinspect the code for these "safeguards" however if we, as OUJS A.M. and CoOwner, see anything remotely resembling a script that contains your security breach we'll probably have to ban it and quite possibly the Author. I'll have to notify AMO to reinspect your addon as well for this as it's quite easy to obfuscate (and is obfuscation in itself) what is happening buried in a comment after further investigation. I wish you would change your mind and work as a team player on this instead of just what you think is "right your way". The community has a lot of experience should you decide to learn from it. GM was taken off AMO in the early days if you recall (or maybe not... depends on your tenure) for security hacks such as these. Don't let this be a similar repeat... most recently Stylus.
Alternatives can be good as long as they are safe. Not following the standards is unsafe and you'll jeopardize the community security.
Perhaps. I've followed you for quite some time even before the visit on my fork so I perceive a little different motivation but I'm also not you... so there is the benefit of the doubt clause. 😸
No one, including myself, has stated this. However maturity should come in taking constructive feedback especially when a CERT can be issued against bad extensions. This is part of the reason why Mozilla is changing a lot of the innards to prevent bad acting. Please don't contribute to the destruction of your extension as I said it has promise. Make the wiser choice. Since I'm the primary author/maintainer of GM Port I have no concern about competition or not. In fact I encouraged OUJS to not compete with any other .user.js site and the same goes with GM Port. I gracefully filled a browser deficit with SM so did sizzle from USO. It's not a race to have one sect win. That is immature assumptions and behavior which I do not practice. However improvement is always a goal one step at a time.
Interesting. Won't go into that one as you are correct there are a lot of variations and also legal implications. Anyhow... I'll go ahead and close this as you've answered most of the basic questions and improved my understanding of your implementation. Thanks for the clarifications and understanding. |
Just a note .... Besides that fact that Example:
GM treat this as 1 match and FireMonkey as 2 matches (and they are clearly displayed in the script Info for the user) which is the same as:
Again that is up to users to chose a script and script writer that doesn't attempt to deceive. Furthermore, in this case, scripts may run on unexpected sites (but there is Info) but so does the result of the wildcard implementation in GM etc i.e. HOWEVER, I will think about ways to prevent the above situation. Also, FireMonkey supports block metablock which others dont e.g.:
AFA standards, the standard has never been to include comments in meta-block. Finally, as per addon's description:
In other words, FireMonkey is not GM or VM or TM and does not aim to be a clone of them either. Therefore, comparison and/or full 100% compatibility is not the criteria. The included Help explains how FireMonkey works. |
Those were chosen at random. Pick
After the fact... not before. Not everyone knows (or sometimes cares) what kind of security issues are present. The responsible thing to do is to educate and put in some basic safeguards. Some put in more than is needed imho (think the other .user.js site) but that is his prerogative within his means.
Might just be a casual comment too describing something which is why the fully documented standard exists and your extension will pick it up incorrectly. You can even have code in between
Well aware of this one. I've banned several UserScripts for being too vague on injection. Some are useful on all sites too. TM/GM Port also has this feature. Been a while since I've tested VM but I think it does too.
That's never been the case. Comments and other code have always been accepted on different lines in the UserScript metadata block. E4X is another example that proves it and so are function expressions and the like for restructuring. This goes back to the origin with Aaron which I'm a later addition to that origin. One can even encompass the entire script in the UserScript metadata block if bored. Granted it looks ick but that's one of the reason why oujs - Meta View was created... in case it's so terribly (imho) abstracted/obfuscated for even newer technologies and methodologies. I ran into one that mirrors node syntax in UserScripts... that threw me for a loop until I asked the Author what was going on... he helped me understand and I helped that Author out too with the build routine to not violate Copyright.
Interesting... that is another parsing nightmare (not yours necessarily... but everyone else who may consider implementing and hosting your new type).
You actively sought out for my feedback... there it is. Even if I had no knowledge of UserScripts I'd still come to these same security concerns of accidental or intentional script injection or alteration. If you want to try to make a spin-off like JetPack used to be you are always welcome to. :) Perhaps it will catch on... perhaps not. You know my 2 cents on this particular security issue. I do like less extensions but at the same time not at the expense of my default understanding of security and privacy. |
Thank you for the feedback which will be taken into consideration. |
Just to let you know, I have updated the code to prevent the unwanted processing of |
Apologies for not getting here sooner... haven't had much free time to twiddle. Also had to wait until the Fx version was beyond your
em:version
(don't do beta and earliers now).Some data for you:
As the A.M. of OUJS we don't have any such policy yet that I know of... assume CORS and/or the like? or something internal to the extension?
OUJS test script (ref'd below) ... Install button did nothing for interception by FireMonkey... so manually created a new script... pasted in content... This console error may be relevant:
Error: WebExtension context not found! ExtensionParent.jsm:1041:13
Export of preferences:
Went to see if the editor had any settings I missed first quick glance... check box for "Enabled" said it was unticked. Ticked it... reloaded web page... new tab load... both not injecting.
Do see your JSON
error
on the regular expression includes... should skip over those if your extension doesn't support them... perhaps the main issue.Bottom line... doesn't seem to inject .user.js yet I think in this use case.
Have not tested UserCSS yet. Scripts are more important to me. :)
Interface is snappy (very nice)... perhaps needs more tooltips eventually under "Script & CSS" panel/sidebar so I know what they do without blindly clicking and seeing what explodes/works. ;) Those icons could use a little larger for high DPI screens... mines not and I have to look pretty close to my monitor just to see what they are. Duplicate, I think of scripts and css with respective checkbox for example is something I can't immediately figure out with more in-depth testing.
Anyhow... looking forward to updates to test and any feedback you want me to try. I don't have a whole lot of time to examine in-depth WebExtensions since the site keeps me very busy... but I'll try to try. 😸
System:
Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0
... profile "dirty" e.g. well used/laundry list (hope you don't mind this for a start)
The text was updated successfully, but these errors were encountered: