Skip to content
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

Start abstracting some validations #1847

Merged
merged 1 commit into from
Nov 20, 2021

Conversation

Martii
Copy link
Member

@Martii Martii commented Nov 20, 2021

  • Catch a few more instances of an invalid key check

* Catch a few more instances of an invalid key check
@Martii Martii added enhancement Something we do have implemented already but needs improvement upon to the best of knowledge. UI Pertains inclusively to the User Interface. CODE Some other Code related issue and it should clearly describe what it is affecting in a comment. labels Nov 20, 2021
@Martii Martii merged commit b91b4b2 into OpenUserJS:master Nov 20, 2021
@Martii Martii deleted the Issue-944postExpansion branch November 20, 2021 07:50
Martii added a commit to Martii/OpenUserJS.org that referenced this pull request Nov 20, 2021
@Martii Martii mentioned this pull request Nov 20, 2021
Martii added a commit that referenced this pull request Nov 20, 2021
Martii added a commit to Martii/OpenUserJS.org that referenced this pull request Nov 20, 2021
@Martii Martii mentioned this pull request Nov 20, 2021
Martii added a commit that referenced this pull request Nov 20, 2021
Martii added a commit to Martii/OpenUserJS.org that referenced this pull request Nov 20, 2021
* Also move the options for this out regardless of state/mode... going to try something in a while to further assist there.

Post OpenUserJS#1847
Martii added a commit that referenced this pull request Nov 20, 2021
* Also move the options for this out regardless of state/mode... going to try something in a while to further assist there.

Post #1847
Martii added a commit to Martii/OpenUserJS.org that referenced this pull request Nov 21, 2021
* Doesn't matter if we are in lockdown or not for this.
* NOTE: On dev this didn't work except under Linux SeaMonkey 2.53.8.1 but not Chromium and Fx 94.0.1. Could be a jQuery dep issue or even a browser issue that appeared... or perhaps something changed scope wise. Commented where it happens. This is better than nothing imho. Maybe it will work under pro and perhaps Windows. \*shrugs\*
* This feature is very BETA due to the issue encountered in other browsers. Any suggestions are welcome.

Post OpenUserJS#1847
Martii added a commit that referenced this pull request Nov 21, 2021
* Doesn't matter if we are in lockdown or not for this.
* NOTE: On dev this didn't work except under Linux SeaMonkey 2.53.8.1 but not Chromium and Fx 94.0.1. Could be a jQuery dep issue or even a browser issue that appeared... or perhaps something changed scope wise. Commented where it happens. This is better than nothing imho. Maybe it will work under pro and perhaps Windows. \*shrugs\*
* This feature is very BETA due to the issue encountered in other browsers. Any suggestions are welcome.

Post #1847

Auto-merge BETA
Martii added a commit to Martii/OpenUserJS.org that referenced this pull request Nov 21, 2021
* Use non-deprecated call... been a while since that code was touched on import. Interesting that Chromium and Fx didn't tell me squat.

Post OpenUserJS#1847
@Martii Martii mentioned this pull request Nov 21, 2021
Martii added a commit that referenced this pull request Nov 21, 2021
* Use non-deprecated call... been a while since that code was touched on import. Interesting that Chromium and Fx didn't tell me squat.

Post #1847

Auto-merge
Martii added a commit to Martii/OpenUserJS.org that referenced this pull request Nov 21, 2021
* toSource added parens JSON.stringify does not

Post OpenUserJS#1847
@Martii Martii mentioned this pull request Nov 21, 2021
Martii added a commit that referenced this pull request Nov 21, 2021
* toSource added parens JSON.stringify does not

Post #1847

Auto-merge *(still BETA)*
Martii added a commit to Martii/OpenUserJS.org that referenced this pull request Nov 22, 2021
* Watch points for URI encoding ... not sure atm if these may be needed or not since browser support has changed. Someone will have to let us know if there is an issue with them with an example `@name` or username. Been too long since I've been in this code to recall if necessity. Shouldn't hurt it I believe.

Post OpenUserJS#1847
Martii added a commit that referenced this pull request Nov 22, 2021
* Watch points for URI encoding ... not sure atm if these may be needed or not since browser support has changed. Someone will have to let us know if there is an issue with them with an example `@name` or username. Been too long since I've been in this code to recall if necessity. Shouldn't hurt it I believe.

Post #1847

Auto-merge (BETA)
Martii added a commit to Martii/OpenUserJS.org that referenced this pull request Nov 22, 2021
* Now I recall some of it... Percent wasn't excluded in `cleanFilename` so we have to double check things. MongoDB doesn't care neither does AWS... but browsers do.

Post OpenUserJS#1847 and applies to OpenUserJS#200

NOTE:
* Test script RFC and n%
@Martii Martii mentioned this pull request Nov 22, 2021
Martii added a commit that referenced this pull request Nov 22, 2021
* Now I recall some of it... Percent wasn't excluded in `cleanFilename` so we have to double check things. MongoDB doesn't care neither does AWS... but browsers do.

Post #1847 and applies to #200

NOTE:
* Test script RFC and n%

Auto-merge
Martii added a commit to Martii/OpenUserJS.org that referenced this pull request Nov 23, 2021
* Force HTTP stack response for Chromium based browsers so their messages show up properly since they still have native .user.js and probably a bugged interpretation of a valid response for no Content-Type. Gecko always returns a blank page no matter the setting at this time. Note this is not needed for 304 which is also a HTTP stack response. Plus they've had this issue in the past with other status codes.
* Usually Chromium based browsers seem to think the "...site can't be reached... ERR_INVALID_RESPONSE"... this changes that to "Access to localhost was denied\nYou don't have authorization to view this page.\nHTTP ERROR 403"
* Not all engines properly detect HTML content vs actual JavaScript type which is one of the reasons why it's pure response status codes.

Applies to https://openuserjs.org/scripts/omgmikey/Chaturbate_Easy_Tipping/issues/when_i_try_to_download_this_script_it_says_page_is_missing#comment-17d4b1769c4 and post OpenUserJS#1847
Martii added a commit that referenced this pull request Nov 23, 2021
* Force HTTP stack response for Chromium based browsers so their messages show up properly since they still have native .user.js and probably a bugged interpretation of a valid response for no Content-Type. Gecko always returns a blank page no matter the setting at this time. Note this is not needed for 304 which is also a HTTP stack response. Plus they've had this issue in the past with other status codes.
* Usually Chromium based browsers seem to think the "...site can't be reached... ERR_INVALID_RESPONSE"... this changes that to "Access to localhost was denied\nYou don't have authorization to view this page.\nHTTP ERROR 403"
* Not all engines properly detect HTML content vs actual JavaScript type which is one of the reasons why it's pure response status codes. Additionally the standard Warning header is already put out instead of wasting unnecessary bandwidth/processes.

Applies to https://openuserjs.org/scripts/omgmikey/Chaturbate_Easy_Tipping/issues/when_i_try_to_download_this_script_it_says_page_is_missing#comment-17d4b1769c4 and post #1847
Martii added a commit to Martii/OpenUserJS.org that referenced this pull request Nov 25, 2021
* Moderators and above may still flag if further abused and of course optionally, unannounced, removal by Admin+. These are covered in the TOS already. Try a preemptive strategy instead.

Post OpenUserJS#1847 and applies to OpenUserJS#657
Martii added a commit that referenced this pull request Nov 25, 2021
* Moderators and above may still flag if further abused and of course optionally, unannounced, removal by Admin+. These are covered in the TOS already. Try a preemptive strategy instead.

Post #1847 and applies to #657

Auto-merge
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CODE Some other Code related issue and it should clearly describe what it is affecting in a comment. enhancement Something we do have implemented already but needs improvement upon to the best of knowledge. UI Pertains inclusively to the User Interface.
Development

Successfully merging this pull request may close these issues.

1 participant