summaryrefslogtreecommitdiffstats
path: root/modules/context
diff options
context:
space:
mode:
Diffstat (limited to 'modules/context')
-rw-r--r--modules/context/repo.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go
index 38baa42306..e8d084c342 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -143,6 +143,9 @@ func (r *Repository) GetEditorconfig() (*editorconfig.Editorconfig, error) {
if err != nil {
return nil, err
}
+ if treeEntry.Blob().Size() >= setting.UI.MaxDisplayFileSize {
+ return nil, git.ErrNotExist{ID: "", RelPath: ".editorconfig"}
+ }
reader, err := treeEntry.Blob().Data()
if err != nil {
return nil, err