openwall / openwall/blists

Omit technical line wraps from displayed headers

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
15
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Header lines may be wrapped for technical and standards compliance reasons. When we display message headers via the web, we currently include those technical line wraps intact. We should omit them. For example, we display:

https://www.openwall.com/lists/oss-security/2024/07/23/2

Subject: [OSSA-2024-002] OpenStack Nova: Incomplete file access fix and
 regression for QCOW2 backing files and VMDK flat descriptors
 (CVE-2024-40767)

but it should be:

Subject: [OSSA-2024-002] OpenStack Nova: Incomplete file access fix and regression for QCOW2 backing files and VMDK flat descriptors (CVE-2024-40767)

I thought this had something to do with:

                /* skip adjacent linear-white-space between previous
                 * encoded-word */
                r = --p;
                if (done != header) {
                        while (r > done && islinearwhitespace(*(--r)))
                                ;
                        if (r > done)
                                r = p;
                }
                buffer_append(dst, done, r - done);

and suspected this logic could be buggy or incomplete, but e.g. omitting if (r > done) r = p; made no difference.

Contributor guide

No contributing guide indexed for this repository

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 example at the linked mailing-list archive URL and trace how folded headers move from parsing to web display. Inspect the header-unfolding logic around the shown linear-white-space code, then verify that the displayed Subject is a single line while header semantics remain intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
backend, web-dev
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.