Editing CSV after 2048 chars results in "Can't render this file because it has a wrong number of fields" error #17378
Labels
No Label
backport/done
backport/v1.0
backport/v1.1
backport/v1.10
backport/v1.11
backport/v1.12
backport/v1.13
backport/v1.14
backport/v1.15
backport/v1.2
backport/v1.3
backport/v1.4
backport/v1.5
backport/v1.6
backport/v1.7
backport/v1.8
backport/v1.9
bounty
changelog
dependencies
frontport/done
frontport/main
good first issue
Hacktoberfest
hacktoberfest-accepted
in progress
kind/api
kind/breaking
kind/bug
kind/build
kind/deployment
kind/deprecated
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/misc
kind/moderation
kind/package
kind/proposal
kind/question
kind/refactor
kind/regression
kind/security
kind/summary
kind/testing
kind/translation
kind/ui
kind/upstream-related
kind/usability
kind/ux
lgtm/done
lgtm/need 1
lgtm/need 2
performance/bigrepo
performance/cpu
performance/memory
performance/speed
priority/critical
priority/low
priority/maybe
priority/medium
proposal/rejected
reviewed/confirmed
reviewed/duplicate
reviewed/fixed
reviewed/invalid
reviewed/not-a-bug
reviewed/wontfix
skip-changelog
stale
status/blocked
status/needs-feedback
status/wip
theme/2fa
theme/authentication
theme/avatar
theme/backup-restore
theme/docker
theme/federation
theme/issues
theme/kanban
theme/markdown
theme/migration
theme/mobile
theme/pr
theme/signing
theme/sqlite
theme/timetracker
theme/webhook
theme/wiki
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: lunny/gitea#17378
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Gitea Version
35b918f574
Git Version
v1.17.2
Operating System
MacOS ARM1
How are you running Gitea?
Gitea developer, so running a build of the main branch on my local system.
Database
MySQL
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Description
If you have a CSV file with more than 2048 characters (bytes), and then edit a line past 2048 characters (bytes), you get this error (line is based on whatever line the 2048th character falls on):
Screenshot:
URL:
ce02bb6107
Yet the regular diff view shows no columns were changed, and both the parent commit and new commit render as CSV tables:
Actually, when you even create a CSV file with more than 2048 characters, the diff of the new file even gives you this error, because the code is only rendering/diffing the first 2048 bytes, and thus if the 2048th byte mark cuts off other fields in that row, that row, 30 in this case, is seen as having the wrong number of columns. See:
44d026d24f
(both diff and CSV table)Screenshots