-
Notifications
You must be signed in to change notification settings - Fork 301
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
Script Name Casing Duplicates #656
Comments
This is more or less a duplicate but important enough to keep tracking as an individual issue as a watch point with the parent milestone. Thanks for the report. |
We identify scripts by @name and @namespace, which are both case-sensitive.
|
However this bug might be the result of case-insensitivity in the actual
|
Yup... and when we move to Honestly I'd rather just like to have a comparison of old to new and create a new indexed script... and if the toLowerCase of the url matches then possibly prompt. The basic moral here is don't change the core UserScript metadata items... will be a bit tricky to handle the logic but I think it's quantifiable since we do this for discussions already. |
GM keeps the same local storage name if you download from same place, no matter what changes you make to the meta. Old USO, GreasyFork, Gist and Github have same unquie id. All the sites you can rename and still have a unique id to keep track of the original. Anyway, I renamed the script without much thought. I forgot about OUJS unique behaviour. |
Type checks for owned re-casing test:
Conclusion... duplicate script made in DB with shared OUJS metadata.
Possibly in |
FYI: GM is case-insensitive. |
FYI: It shouldn't be... it should be case sensitive and is reconfirmed here. (Meta keys and values, even at the file system level, with lower case
Invalid for that portion of this report. Further GM engine refs: |
Odd, retested it and you are right. First time I time I tested it, I had a script called "TEST" and "test" and one overwrote the other. Tried again and not the case. Must have made a mistake. |
@sizzlemctwizzle
|
* **NOTE** This is not the permanent solution but a compromise on existing S3 DB structure and this hot fix isn't as effecient as OpenUserJS#486 solution *(hence the term hot fix vs solution)*. * Change `caseInsensitive` regular expression maker into `caseSensitive` with exception on username to accomodate OpenUserJS#180 without the issue in OpenUserJS#656 * This removes the future security issue with unintended hidden scripts... manual DB examination will need to happen for anyone who has done this before but can be done in time with @sizzlemctwizzle and/or @Martii... future scripts should properly be created at least. * Noted code inconsistency with `installName` versus "more than `installName`"... this should be corrected at some point. * Leaving `caseInsensitive` in as a potential library function in `scriptStorage`... which could probably be in libs but that's where it is currently. Closes OpenUserJS#656
@TimidScript |
* Still used to a slightly different coding style myself...apologies Applies to OpenUserJS#658, OpenUserJS#656, OpenUserJS#486, and OpenUserJS#180
@Martii |
If you change the casing of your script name you are unable to access latest version.
Steps I took and the bug it created.
I had a script name with the word "deviantART" I changed it to "DeviantArt" and updated the version from 1.0.5 to 1.0.6. In the script listing the name remains "deviantArt", but the version is 1.0.6. When you try and install or look the code, it points to 1.0.5. I fixed it by updating the script again but with the old casing "deviantArt". There might be a script floating around in the database with the name "DeviantArt", that's not deleted.
(Making the user and script name as the UID causes some painful limitations to the script author. On top breaking auto-update, the install counter resets.)
The text was updated successfully, but these errors were encountered: