Closed morioprog closed 4 years ago
@morioprog just to confirm: are you logged in?
@kmyk I checked, and I'm logged in. I also logged in again by deleting cookie.jar
, but it still fails.
$ oj l https://codeforces.com
[INFO] online-judge-tools 10.1.2 (+ online-judge-api-client 10.3.2)
[INFO] service recognized: CodeforcesService.from_url('https://codeforces.com/'): https://codeforces.com
[INFO] load cookie from: /Users/morio/Library/Application Support/online-judge-tools/cookie.jar
[NETWORK] GET: https://codeforces.com/enter
[NETWORK] 302 Found
[SUCCESS] You have already signed in.
[INFO] save cookie to: /Users/morio/Library/Application Support/online-judge-tools/cookie.jar
@morioprog thank you for checking!
It's a problem about User-Agent. I'll stop sending them.
They accepts the usual UA like Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
or just no UA, but denies others. It seems implemented based on an allowlist.
I think that they should use denylist instead and accepting the no UA is just their bug.
Description
When I try to submit to Codeforces, it receives
403 Forbidden
error message.Error log
Environment
macOS Catalina 10.15.6 (19G2021)
Other notes