Problem: Login used `user=` field (correct is `uname=`) and checked for
`"success"` key in response (USACO returns `{"code":1}`). Submit used
the wrong endpoint, wrong file field name (`sub_file[]` vs `sourcefile`),
had an off-by-one in hidden field extraction (`group(2)` vs `group(1)`),
and `_pick_lang_option` matched C++11 before C++17 due to iterating
options before keywords. Login fast path also accepted stale cookies
with wrong credentials.
Solution: Fix `uname` field and `code==1` check. Fix submit to
`submit-solution.php`, `sourcefile` field, and `group(1)`. Invert
`_pick_lang_option` loop order (keywords outer, options inner) so
specific keywords like `"c++17"` match before `"c++"`. Remove fast
path from login subcommand so credentials are always validated.
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| atcoder.py | ||
| base.py | ||
| codechef.py | ||
| codeforces.py | ||
| cses.py | ||
| kattis.py | ||
| language_ids.py | ||
| models.py | ||
| timeouts.py | ||
| usaco.py | ||