Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[BUG] Mime decoder for attachment filename (Content-Disposition)

Open
#853 0 comments 0 reactions 1 assignee View on GitHub

@kay-schecker is already working on this.

Since Dec 20, 2024.

Assessment

This issue has not been assessed yet.

Description

bug

I have MIME encoded filename in Content-Disposition header like "=?UTF-8?Q?Invoice_4.png?="
ApiClient does not decode it before sanitizing and fails on temporary file creation.

if (matcher.find()) { filename = sanitizeFilename(matcher.group(1)); }

ApiClient.prepareDownloadFile must decode filename!

<dependency>
  <groupId>com.sun.mail</groupId>
  <artifactId>javax.mail</artifactId>
  <version>1.6.2</version>
</dependency>

filename = sanitizeFilename(MimeUtility.decodeText(matcher.group(1)));

This solution works fine!

Dominant language
TypeScript
Stars
2k
Forks
208
Avg merge
7h 12m
Merged PRs (30d)
6

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.

More from OpenAPITools/openapi-generator-cli

All issues in OpenAPITools/openapi-generator-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.