-
Notifications
You must be signed in to change notification settings - Fork 291
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
update the m_string for GIthub, Gitlab and Foursquare #724
Conversation
update `m_string` as Foursquare redirects. It now includes `302 Found</title>` in the response on the 302.
if you query a on existing user using a non-browser device (i.e. `curl`, `httpx` or similar) you only get one line in the response, which is `'Not Found'`, when you query a user that does not exist. No HTML is returned at all.
Gitlab redirects you to a login form with status code 302 if you query a non-existing user. The yields this response: `<html><body>You are being <a href="https://gitlab.com/users/sign_in">redirected</a>.</body></html>`
fix double quote issue
fix double quote issue part 2...
@@ -2300,7 +2300,7 @@ | |||
"uri_check" : "https://github.com/{account}", | |||
"e_code" : 200, | |||
"e_string" : "p-nickname vcard-username d-block", | |||
"m_string" : "<title>Page not found ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python isn't my language of choice, but trying:
import requests
url = "http://github.com/abcdeffsafas"
payload = {}
headers = {
'Accept-Encoding': 'identity',
}
response = requests.get(url, headers=headers, data=payload)
print(response.text)
Returns 'Not Found'
print(response.status)
Returns 404.
Not sure if this is at all helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try curl 'https://github.com/abcdeffsafas' -H 'authority: github.com' -H 'accept: text/html'
and you get the entire HTML. Without that "text/html" header part, it'll only give the Not Found. Problem is that, if our users are using tools like whatsmyname.app, they will be sending the header data and will get a different result.
This is not that big a deal in reality, since most tools do not use the m_string
at all.
In the web browser, the response contains not found
but not Not Found
. On the command line, it is reversed. So if a tool does case sensitive matching of the responses, it will get false positives/negatives depending on how the site is checked.
Since most of the users of this project use the web browser version AND since most tools don't even check the m_string
I'd like to leave the string as it is.
@@ -2066,7 +2066,7 @@ | |||
"uri_check" : "https://foursquare.com/{account}", | |||
"e_code" : 200, | |||
"e_string" : "on Foursquare</title>", | |||
"m_string" : "Foursquare - Independent Location Data Platform", | |||
"m_string" : "302 Found</title>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not seeing this in the response. Can you confirm and explain how you are checking this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me, it's redirecting to the home page. With the page title: "Location Technology Unlocking Powerful Connections | FSQ"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with node (axios) and python (requests) and received the same. Redirects to home with: <title>Unlocking Powerful Consumer Connections with Location | FSQ</title>
Sorry to do this but I'm traveling and cannot check more into these submissions. The PR will need to remain open for a little bit until I return. |
The current
m_string
for missing accounts are wrong. I've updated the ones I get, when using HTTP clients (curl
&requests
).