You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/modules/setting
Henrique Pimentel f7125ab61a
Add `MAX_ROWS` option for CSV rendering (#30268)
This solution implements a new config variable MAX_ROWS, which
corresponds to the “Maximum allowed rows to render CSV files. (0 for no
limit)” and rewrites the Render function for CSV files in markup module.
Now the render function only reads the file once, having MAX_FILE_SIZE+1
as a reader limit and MAX_ROWS as a row limit. When the file is larger
than MAX_FILE_SIZE or has more rows than MAX_ROWS, it only renders until
the limit, and displays a user-friendly warning informing that the
rendered data is not complete, in the user's language.

---

Previously, when a CSV file was larger than the limit, the render
function lost its function to render the code. There were also multiple
reads to the file, in order to determine its size and render or
pre-render.

The warning: ![image](https://s3.amazonaws.com/i.snag.gy/vcKh90.jpg)
9 months ago
..
config Customizable "Open with" applications for repository clone (#29320) 1 year ago
actions.go add skip ci functionality (#28075) 1 year ago
actions_test.go Restrict `[actions].DEFAULT_ACTIONS_URL` to only `github` or `self` (#25581) 2 years ago
admin.go Add setting to disable user features when user login type is not plain (#29615) 11 months ago
api.go Refactor the setting to make unit test easier (#22405) 2 years ago
asset_dynamic.go Use a general approach to access custom/static/builtin assets (#24022) 2 years ago
asset_static.go Use a general approach to access custom/static/builtin assets (#24022) 2 years ago
attachment.go Update allowed attachment types (#29688) 12 months ago
attachment_test.go Fix all possible setting error related storages and added some tests (#23911) 2 years ago
cache.go Always enable caches (#28527) 1 year ago
camo.go Refactor the setting to make unit test easier (#22405) 2 years ago
config.go Customizable "Open with" applications for repository clone (#29320) 1 year ago
config_env.go Fix `environment-to-ini` inherited key bug (#27543) 1 year ago
config_env_test.go Fix `environment-to-ini` inherited key bug (#27543) 1 year ago
config_provider.go Initial support for colorblindness-friendly themes (#30625) 10 months ago
config_provider_test.go Fix INI parsing for value with trailing slash (#26995) 1 year ago
cors.go Refactor CORS handler (#28587) 1 year ago
cron.go Replace `interface{}` with `any` (#25686) 2 years ago
cron_test.go Rewrite queue (#24505) 2 years ago
database.go Add slow SQL query warning (#27545) 1 year ago
database_sqlite.go Implement FSFE REUSE for golang files (#21840) 2 years ago
database_test.go Fix incorrect PostgreSQL connection string for Unix sockets (#28865) 1 year ago
federation.go Refactor the setting to make unit test easier (#22405) 2 years ago
git.go Use `[git.config]` for reflog cleaning up (#24958) 2 years ago
git_test.go Use `[git.config]` for reflog cleaning up (#24958) 2 years ago
glob.go Improve grep search (#30843) 10 months ago
highlight.go Refactor the setting to make unit test easier (#22405) 2 years ago
i18n.go Refactor the setting to make unit test easier (#22405) 2 years ago
incoming_email.go Resolve lint for unused parameter and unnecessary type arguments (#30750) 10 months ago
indexer.go Improve grep search (#30843) 10 months ago
indexer_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
lfs.go Use general token signing secret (#29205) 1 year ago
lfs_test.go Display deprecated warning in admin panel pages as well as in the log file (#26094) 2 years ago
log.go Refactor "dump" sub-command (#30240) 11 months ago
log_test.go Replace `interface{}` with `any` (#25686) 2 years ago
mailer.go Add option for mailer to override mail headers (#27860) 9 months ago
mailer_test.go Remove unnecessary code (#24610) 2 years ago
markup.go Add .livemd as a markdown extension (#22730) 2 years ago
metrics.go Refactor the setting to make unit test easier (#22405) 2 years ago
migrations.go Refactor the setting to make unit test easier (#22405) 2 years ago
mime_type_map.go Refactor the setting to make unit test easier (#22405) 2 years ago
mirror.go Avoid polluting the config (#25345) 2 years ago
oauth2.go Always load or generate oauth2 jwt secret (#30942) 9 months ago
oauth2_test.go Always load or generate oauth2 jwt secret (#30942) 9 months ago
other.go Add `[other].SHOW_FOOTER_POWERED_BY` setting to hide `Powered by` (#30253) 11 months ago
packages.go Avoid creating directories when loading config (#25944) 2 years ago
packages_test.go Fix all possible setting error related storages and added some tests (#23911) 2 years ago
path.go Do not allow different storage configurations to point to the same directory (#30169) 11 months ago
path_test.go Refactor path & config system (#25330) 2 years ago
picture.go Fix all possible setting error related storages and added some tests (#23911) 2 years ago
project.go Refactor the setting to make unit test easier (#22405) 2 years ago
proxy.go Refactor the setting to make unit test easier (#22405) 2 years ago
queue.go Increase queue length (#27555) 1 year ago
repository.go Refactor startup deprecation messages (#30305) 11 months ago
repository_archive.go Fix all possible setting error related storages and added some tests (#23911) 2 years ago
repository_archive_test.go Fix all possible setting error related storages and added some tests (#23911) 2 years ago
security.go Remember login for a month by default (#30150) 11 months ago
server.go Refactor startup deprecation messages (#30305) 11 months ago
service.go Add reverseproxy auth for API back with default disabled (#26703) 1 year ago
service_test.go Fix allowed user types setting problem (#26200) 2 years ago
session.go Refactor startup deprecation messages (#30305) 11 months ago
setting.go Initial support for colorblindness-friendly themes (#30625) 10 months ago
setting_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
ssh.go Expanded minimum RSA Keylength to 3072 (#26604) 2 years ago
storage.go Azure blob storage support (#30995) 9 months ago
storage_test.go Azure blob storage support (#30995) 9 months ago
task.go handle deprecated settings (#22992) 2 years ago
time.go Enable more `revive` linter rules (#30608) 10 months ago
ui.go Add `MAX_ROWS` option for CSV rendering (#30268) 9 months ago
webhook.go Refactor the setting to make unit test easier (#22405) 2 years ago