Base64 Decoder: show precise errors for invalid characters and padding
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
What problem does this solve?
When Base64 decoding fails, a generic error makes it difficult to find the problem in a long input.
Identifying the invalid character or padding position would help users fix malformed tokens, copied payloads, and encoded file contents more quickly.
Proposed solution
Improve Base64 validation and decoding errors with specific explanations and input positions.
Scope
- Identify invalid characters and their positions in the original input.
- Detect padding placed before the end of the encoded content.
- Detect excessive padding and invalid encoded lengths.
- Detect inputs mixing standard Base64 characters (
+,/) with URL-safe characters (-,_). - Explain which alphabet is accepted by the selected decoding mode.
- Preserve the tool’s existing handling of whitespace, missing padding, and data-URI prefixes where supported.
- Keep valid Base64 that decodes to binary distinguishable from a decoding failure.
- Do not silently remove invalid characters or rewrite the input.
Acceptance criteria
- Invalid characters produce an actionable message with a 1-based position.
- Positions refer to the original input, including when whitespace or a supported data-URI prefix is present.
- Misplaced padding, excessive padding, and impossible lengths have distinct messages.
- Mixed alphabets produce a clear explanation consistent with the selected mode.
- Valid standard and URL-safe inputs continue to decode correctly.
- Existing supported unpadded inputs remain supported.
- Valid binary output is not reported as malformed Base64 merely because it is not UTF-8 text.
- Failed decoding clears stale output.
- Error messages are accessible and readable in both site themes.
- Validation logic lives in
lib/with tests for each error category and existing accepted input formats. - All validation and decoding happen locally in the browser.
npm run lint && npm run test && npm run buildpass.
Automatic input repair, new encoding formats, and changes to file-size limits are outside this issue’s scope.
Fit
- This can work entirely in the browser with no server or data leaving the tab.
- Lenguaje dominante
- TypeScript
- Estrellas
- 1
- Forks
- 9
- Merge medio
- 7 h 46 min
- PR fusionados (30 d)
- 186
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de codercops/toolbelt
-
Text Case Converter: show how identifiers are split into wordsPosiblemente ocupada @srikar-naidu la tomó hoy. Abiertoenhancement hacktoberfest
codercops/toolbelt#409 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Regex Tester: add next/previous match navigationPosiblemente ocupada @kachamsiddarth la tomó hoy. Abiertoenhancement hacktoberfest
codercops/toolbelt#380 · 5 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Hacktoberfest 2026: start hereAbiertohacktoberfest
Dificultad 1/5 Menos de una hora Aptitud para principiantes 1/100
codercops/toolbelt#101 · 17 comentarios ·
Los mantenedores suelen responder en 1 día
-
[admin] Quarterly content-refresh routineQuizá libre de nuevo @anurag629 la tomó hace 110 días y no hay ningún pull request abierto. Abiertoadmin-only seo
codercops/toolbelt#47 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[admin] Repurpose guides to dev communities and socialQuizá libre de nuevo @anurag629 la tomó hace 110 días y no hay ningún pull request abierto. Abiertoadmin-only seo
codercops/toolbelt#44 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de codercops/toolbelt
Issues similares
-
area:plugins area:security area:skills bug has repro
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
anthropics/claude-code#105911 ·
Los mantenedores suelen responder en 1 día
-
openspec-apply-change skill: when blocked, may select a ready artifact unrelated to missingArtifactsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Fission-AI/OpenSpec#2165 ·
Los mantenedores suelen responder en 1 día
-
🐞 bug 🧐 unconfirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Tencent/tdesign-vue-next#7032 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
gnosis/gnosis_vpn#661 ·
Los mantenedores suelen responder en 1 día
-
content-freshness: staleOwnedContent doc comments still say 'complete receipt' (follow-up to #7912)Abiertotriage:bug-verified
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día