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

update the m_string for GIthub, Gitlab and Foursquare #724

Merged
merged 7 commits into from
Oct 14, 2023
Merged

update the m_string for GIthub, Gitlab and Foursquare #724

merged 7 commits into from
Oct 14, 2023

Conversation

janldk
Copy link
Contributor

@janldk janldk commented Jul 13, 2023

The current m_string for missing accounts are wrong. I've updated the ones I get, when using HTTP clients (curl & requests).

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>`
wmn-data.json Outdated Show resolved Hide resolved
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 ",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked on this and I'm getting the correct m_string
image

Could this be a difference depending on method of checking?

Copy link
Contributor

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.

Copy link
Owner

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>",
Copy link
Owner

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?

Copy link
Contributor

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"

Copy link
Contributor

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>

@WebBreacher
Copy link
Owner

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.

@WebBreacher WebBreacher merged commit 34ae8b9 into WebBreacher:main Oct 14, 2023
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants