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

Blocked by LeetCode.com #69

Open
yangrq1018 opened this issue Mar 6, 2024 · 4 comments · Fixed by #70
Open

Blocked by LeetCode.com #69

yangrq1018 opened this issue Mar 6, 2024 · 4 comments · Fixed by #70

Comments

@yangrq1018
Copy link

I can sign in normally in firefox, but the plugin is getting response like this:

<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Attention Required! | Cloudflare</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->
<style>body{margin:0;padding:0}</style>
<!--[if gte IE 10]><!-->
<script>
  if (!navigator.cookieEnabled) {
    window.addEventListener('DOMContentLoaded', function () {
      var cookieEl = document.getElementById('cookie-alert');
      cookieEl.style.display = 'block';
    })
  }
</script>
<!--<![endif]-->
</head>
<body>
  <div id="cf-wrapper">
    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>
    <div id="cf-error-details" class="cf-error-details-wrapper">
      <div class="cf-wrapper cf-header cf-error-overview">
        <h1 data-translate="block_headline">Sorry, you have been blocked</h1>
        <h2 class="cf-subheadline"><span data-translate="unable_to_access">You are unable to access</span> leetcode.com</h2>
      </div><!-- /.header -->
      <div class="cf-section cf-highlight">
        <div class="cf-wrapper">
          <div class="cf-screenshot-container cf-screenshot-full">

              <span class="cf-no-screenshot error"></span>
<remain truncated>
@ravsii
Copy link

ravsii commented Mar 6, 2024

Although I don't know how to check the response page, I believe I'm facing the same problem. Can't login from the plugin, but no problems logging in on the website or via vscode plugin (which uses cookies as well)

@HakonHarnes
Copy link
Contributor

Same issue here.

@kawre
Copy link
Owner

kawre commented Mar 6, 2024

Although I don't know how to check the response page, I believe I'm facing the same problem. Can't login from the plugin, but no problems logging in on the website or via vscode plugin (which uses cookies as well)

@ravsii Can you run code on vscode though? I tried and I can't

Usually leetcode enables some sort of user authentication via cloudflare on high loads, that I'm pretty sure only browsers can pass. From what I've seen it only last few hours at most.

But this time it seems to be different, rather than say something along the lines of enable javascript it now says to enable cookies, lets hope it's not permanent.

@HakonHarnes
Copy link
Contributor

HakonHarnes commented Mar 6, 2024

@kawre I believe it's just cloudflare blocking the request to due the missing user-agent header. Works for me with PR #70.

@kawre kawre closed this as completed in #70 Mar 6, 2024
kawre added a commit that referenced this issue Mar 14, 2024
@kawre kawre reopened this Mar 15, 2024
@kawre kawre pinned this issue Mar 15, 2024
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 a pull request may close this issue.

4 participants