Control Freak: Large file blocking is rejecting files that are being added by LFS
(Note: I wrote up the below as I initially though this only applied to specific file blocking, but I have tested and see the same behavior when using only the large file blocking option)
I’ve got the block specific files set up to block a number of file types with a max size of 0. When trying to add a file with a blocked extension via LFS I am still getting the Control Freak rejection. I have attempted this on an existing repo with a file that was already tracked via LFS in the repo (with a change, so I would expect the trigger to kick in) as well as a new file in that repo, as well as a new repo with a new file. Here is what I see in my new repo using a new file. I’m on Bitbucket 5.14.1 and I’m not sure which version of Control Freak is installed (I have no system admin access).
Rejection message:
user@host:test_repo (master)$ git lfs ls-files
0852c2aba8 * File.exe
user@host:test_repo (master)$ git commit -m "test exe"
[master b5b8ef5] test exe
2 files changed, 4 insertions(+), 1 deletion(-)
create mode 100644 File.exe
guser@host:test_repo (master)$ git push
Uploading LFS objects: 100% (1/1), 136 KB | 0 B/s, done.
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 12 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 458 bytes | 229.00 KiB/s, done.
Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Control Freak: Push rejected.
remote:
remote: Control Freak
remote: -----
remote: Push rejected.
remote: All files larger than 1048576 bytes are not permitted.
remote: Specific files [*.7z, *.bin, *.db, *.dblite, *.dll, *.doc, *.docx, *.exe, *.ipch, *.o, *.obj, *.pdb, *.pdf, *.zip] larger than 0 bytes are also not permitted.
remote: The following file is too large:
remote:
remote: File.exe (131 bytes)
remote:
remote: You can push large files to this repository using 'git lfs':
remote: git lfs track <path>
remote:
To <server url>
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '<server url>'
Comments (3)
-
repo owner -
Account Deactivated reporter Ah, I can’t believe the mismatching filesize didn’t raise a flag to me! I appreciate the quick response and that does look like what it may be (the pointer file in this case is indeed 131 bytes). It looks like I can use a bigger size that will still catch most things people may do for now.
-
repo owner - changed status to resolved
Fixed in Control Freak version v2020.11.03 (which was published today).
- Log in to comment
Oh, this is embarrassing. I need to do some research and confirm but I wonder if the special LFS pointer file is itself being counted against the file-size limit…. let me get back to you on this.