[Feature] Integrity verification

未關閉
#35 12 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
25/100
Issue 類型
功能
描述清晰度
需要釐清
活躍度
停滯
領域
documentation

研究方向

首先閱讀目前的 AppImage 格式規範,以及連結的 AppImageSpec issues #29 和 #34。比較 MD5、檔案大小和 CRC 這幾種提議的方法,然後確定規範應採用哪種完整性機制,以及將如何驗證完成情況。

由索引模型根據 Issue 內容生成。

描述

wontfix

AppImages are files which can get really big in size, and download errors can occur with such sizes
I propose to add some way to (at least try to) verify it's integrity at launch

Why ?
As of now, a partially downloaded AppImage will fail to launch with

Something went wrong trying to read the squashfs image.

Cannot mount AppImage, please check your FUSE setup.
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 
See https://github.com/AppImage/AppImageKit/wiki/FUSE 
for more information
open dir error: No such file or directory

It is maybe harmless in this case, but I think it could potentially cause problems if the partially downloaded AppImage seems like a legit squashfs image. (This is only a theory, I do not have any proof this can happen)

Implementation propositions :

  • Use https://github.com/AppImage/AppImageSpec/issues/29 and verify the md5sum of the AppImage on launch.
    Cons : as pointed there, that would be costly. Plus, I'm not sure if this section is actually going to be in the specification
  • Store the file size in bytes in an ELF section, maybe .appimage_size, and verify the size of the executed file is the same
    Cons : some programs might zerofill the file and fill bytes as their download them
  • Store a CRC checksum in an ELF section, maybe .crc_checksum, and verify it. I think that's the best option, because CRC is an algorithm made for file integrity (as opposed to a simple file size verification), and is more lightweight than MD5

I think this feature should be looked at before https://github.com/AppImage/AppImageSpec/issues/34 (because well, it would modify the spec)

主要語言
沒有語言資料
星號
94
分支
30
PR 合併指標
30 天內沒有已合併 PR

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

AppImage/AppImageSpec 的其他 Issue

查看 AppImage/AppImageSpec 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。