cms-dev / cms-dev/cms

"url" is None during error template rendering

Open
#1,069 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

aws bug
Dominant language
Python
Stars
1k
Forks
412
Avg merge
6d 10h
Merged PRs (30d)
3

Description

Steps to reproduce:

  1. Assume CWS is running in multi-contest mode and listening on localhost:8888
  2. Run telnet localhost 8888
  3. Request a non-existing contest page:
GET /zzz HTTP/1.1
Host: localhost

  1. Actual output:
HTTP/1.1 404 Not Found
Server: TornadoServer/4.5.3
Content-Type: text/html; charset=UTF-8
Date: Tue, 06 Nov 2018 18:25:50 GMT
Content-Length: 224
Set-Cookie: zzz_login=""; expires=Mon, 06 Nov 2017 18:25:50 GMT; Path=/
Set-Cookie: _xsrf=2|47f2b7e0|d92adbae5745d453d5769a29a88df401|1541528750; Path=/

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <title>Error 404***OUTPUT STOPS HERE***
  1. After that the server is still listening and responds to further requests on the same connection.

Environment: Ubuntu 18.04 with Python dependencies installed from the system; CMS is built from master and runs with Python 3.

We can also see that the server tries to set cookies for the non-existent contest.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the multi-contest request to /zzz on the running CMS and inspect the error template rendering path, including the response headers and cookies shown in the report. Done means the 404 response renders completely for a non-existent contest and does not set cookies for that contest.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.