hackerkid / hackerkid/codejam-commandline

Won't Work Unless Less Secure Apps Allowed

オープン
#31 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
auto-migrated Priority-Medium Type-Defect
主要言語
Python
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

```
What steps will reproduce the problem?
1. Put user email in user_config.py. Account with 2FA but without less secure
apps allowed.
2. Run gcj_init_contest.py.
3. Enter correct password.

What is the expected output?
Successfully logged into "code.google.com" with user ""
Followed by initialization of contest

What do you see instead?
Traceback (most recent call last):
File "./gcj_init_contest.py", line 81, in
main()
File "./gcj_init_contest.py", line 63, in main
contest_manager.Initialize(-1, contest_id, options.password)
File "/vagrant/command/lib/contest_manager.py", line 232, in Initialize
code_jam_login.Login(password)
File "/vagrant/command/lib/code_jam_login.py", line 306, in Login
_, cookie = MakeLogin(host, user, password)
File "/vagrant/command/lib/code_jam_login.py", line 160, in MakeLogin
host, 'HOSTED_OR_GOOGLE', user, password, 'ah', application_name, False)
File "/vagrant/command/lib/google_login.py", line 199, in Login
source)
File "/vagrant/command/lib/google_login.py", line 123, in _GetGoogleAuthtoken
response_dict = _ParseBodyAsDict(e.read())
File "/vagrant/command/lib/google_login.py", line 69, in _ParseBodyAsDict
return dict(line.split('=') for line in body.split('\n') if line)
ValueError: dictionary update sequence element #1 has length 5; 2 is required

Receive an email subject: "Google Account: sign-in attempt blocked"
Included in text: "You can switch to an app made by Google such as Gmail to
access your account (recommended) or change your settings at
https://www.google.com/settings/security/lesssecureapps so that your account is
no longer protected by modern security standards."

What version of the product are you using? On what operating system?
1.2-beta1, win8

Please provide any additional information below.

Workaround is to set my Google account so that it is no longer protected by
modern security standards.
```

Original issue reported on code.google.com by `GeoJunki...@gmail.com` on 18 Mar 2015 at 1:11

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start with gcj_init_contest.py and follow the login path through lib/contest_manager.py, lib/code_jam_login.py, and lib/google_login.py, especially _GetGoogleAuthtoken and _ParseBodyAsDict. Reproduce the blocked-login response without enabling less secure apps, then verify the authentication flow handles that response correctly rather than raising the reported ValueError.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
authentication, cli
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。