-
Notifications
You must be signed in to change notification settings - Fork 192
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
Fixes #639: Add ability to load search results from URL params for non-logged in users #650
Conversation
Aww sad, conflict city. |
…ed in users. This works by requesting directly from GitHub, rather than proxying from the webcompat.com server.
OK, rebased against master. Ping @karlcow? |
Note: some of these tests will fail because we renamed labels in the test repo and this branch's tests are expecting the old labels. Safe to ignore... 💣 |
# Non-authed users should never get here--the request is made to | ||
# GitHub client-side)--but return out of paranoia anyways. | ||
elif params.get('q'): | ||
return |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
so far so good no issues. Opening a clean profile of Firefox. Not logged at all to any services. no search form is visible in the page. Normal? Did I miss a step? Entering Manually the search with "love" and getting a result. But then I went through the python API, the request on the server log is
I wonder if we should forbid this against script kiddies. I guess maybe it's the answer to the |
No, that's fine. Right now the search form is hidden for non-logged in users. #639 is about loading search results from a URL when you aren't logged in.
Can you explain what you mean here, or what steps you took via the API? The API shouldn't be making any requests to GitHub at this point (this is the explicit
This search API request is made from the client-side. So if people abuse it, GitHub will punish their IP, not us. |
If I understood your modifications, the request is made by the JavaScript client to Github directly (no webcompat involved). But if I enter http://localhost:5000/issues?page=1&per_page=50&state=open&stage=all&sort=created&direction=desc&q=love I do request webcompat and not github. And because the form is not here, it's not the JS client doing the request to github. |
In the two previous comments I explained what I did litterally. |
OK, let me try to think this through to make sure I'm thinking of the right thing:
You can see the XHR request going to GitHub, not webcompat.com.
One way to verify that we're not actually hitting the webcompat API is to check the XHR logs. We can also swap out the empty |
After I log in, I see the following:
While logged out my server console doesn't show a hit to |
I should sleep more. 🙏🙇🏼 |
with the 404. Everything is fine. :) |
Fixes #639: Add ability to load search results from URL params for non-logged in users
Me too. Bed time. Thanks for thinking through this with me. 🔨 |
(Used this easy task as an excuse to get my hands dirty in webcompat code again.)
r? @karlcow @tagawa