-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remaining leftover changes from my fork #962
Comments
I would use appcast's |
Interesting. Why not the other way around? Only using the http content length as the fallback. From one perspective, the appcast length is more trustworthy and should be correct. |
Because HTTP is authoritative in this regard. Appcast author can put an incorrect value (which isn't hard when writing appcasts manually), but it's not possible to report an incorrect value on HTTP level (if you try to, either it will become the size you actually get, or the connection will get stuck waiting forever). |
|
I'm not familiar with the details why |
What would be the consequence of dropping older versions of Xcode? Since we require 64-bit Intel, probably nothing serious, since even apps that require older Xcode to build could link with pre-built Sparkle. |
Merging of update nibs would be great. That bloats the framework for just tiny UI variation. |
You have an updater that updates a bundle different from itself. Once the bundle is updated, the updater (still living) needs to know that bundle has been updated. The info dictionary needs to be re-read.
One thing I may have to look into short-term is if I should make a different flag or different API for logging info vs errors, like all logging APIs (including Apple's) tend to have. But I suppose I could just log info for now using the same call.
I may rethink this. Time may make more sense though. The 2nd launch would refer to the updater in any case, not the application. I did once see someone screen recording my app though and hitting 'No' when the permission prompt showed up :(. |
http is not authoritative. An attacker (MITM) can cause an incorrect http length to be reported. An attacker can't modify the length in the appcast if the appcast is signed (a modification I use in Tunnelblick). I like @zorgiepoo's defensive approach much better. If the length is specified in the appcast, the http length must agree or it should be considered an error. |
On the other hand, we don't sign the feed in our branch, and it may be more likely the case someone inserts an incorrect length in the appcast than for an attacker intercepting the value. Regardless if there's an attacker or not, a client (Sparkle in our case) needs to be able to handle the case if the value is incorrect. |
@jkbullard I don't mean that authoritative is secure and bulletproof, but rather that by design it's the canonical source of that information (whether it's sent by the author or attacker). We don't sign appcasts and don't intend to, so for Sparkle length in HTTP response headers and HTTP response body is equally (in)secure, but the latter is easier to get wrong for authors. Note also that we (and Apple via ATS) strongly urge to use HTTPS, which protects response length. We verify integrity of updates, so even over HTTP false length isn't a security issue (it'll cause update to be rejected, or cause connection to time out). |
@pornel https: provides no protection if a CA (any CA) has been compromised (which has happened) or if the web server has been compromised (which has happened). Only DSA signing is fully under the control of the developer. We have different threat models, I guess. I try to protect (as best I can) against state-level attackers, so Tunnelblick requires https: and DSA signing of both the appcast and the update. Defense in depth. Anyway, thanks for all your and zorgiepoo's work on Sparkle, it is much appreciated. |
Like I've said previously, false length isn't a security issue for Sparkle. |
Submitted PR's for length-fallback, removing old bundle, and making guided packages the default. Added info about automatic downloading & installing, and merging common downloading code under list of big changes. Currently we just have two calls to SULog that act as info calls, one in the piped unarchiver, and one in the dmg unarchiver. I also added a note in the list of small changes about adding a private function to disable logging to stderr/stdout, but still routes through Console.app. "Info" logs are just a bit annoying for debugging, but there absolutely needs to be a way to "hide" them for production CLI tools. |
I'd keep |
it does this!? I'd prefer logging to always go to stderr. The code is fine in general. |
Almost all of our logging code is for errors. Adding SULogError would not result in much less code changing. I didn't create multiple functions because of variable list processing. I think a single function makes sense minus refactoring reasons. Also having SULog being easy to call because you don't specify a level isn't necessarily a good thing ;). I'd prefer logging to not log to stderr if I had to choose one extreme or the other, so I agree with Apple here. A CLI tool should really not spit out debug logging to stderr, or it should at least have control over such info being spit out on screen. |
I have updated the original post with new information. It's probably worth just re-reading the post. I have reverted the 2nd launch timing to match master's behavior simply because I did not think that was a change worthwhile to make right now. |
This would be very nice
That would be good refactoring too. I feel that currently "update driver" is a wrong abstraction that couples logic of download+install+UI, so we can't have #1007 |
Yeah, when we say that The task list here was completed. Do you want to pull my fork as a branch in this repository now @pornel? If so, I can start to do work, hopefully mostly documentation related, here now. |
Here I'll keep an update a track of a list of some "small" changes from my fork that could possibly be made. I may not have much time left so this is what I want to focus on. Let me know what you think should or should not be addressed in the near future.
length
attribute for appcast items to exist.foo.sparkle_interactive.pkg
orfoo.sparkle_interactive.mpkg
foo.sparkle_guided.pkg
for their website distribution.Don't ask for update permission after 3 (or x) number of hours, instead of 2nd launch2nd launch is a poor metric; user could launch application more than once in a short period of time.In my fork where support for updating other bundles is improved, the lifetime of the updater and bundle to update are distinct, and the updater be started up repeatably and not ran for long (e.g.sparkle-cli
)SULog()
usageSULog()
simultaneously (very common in my fork). Always writes to disk.SUHost
to reload the Info dictionary (bypassing NSBundle cache)Changes that are too big or not relevant to
master
:master
suffers from issues when waiting for the host app to terminate by using an AppKit event, which is not very reliable. My fork relies on listening for termination via a pid instead from the background installer process. Eg: master's behavior would fail with Qt apps, or apps that just didexit(0)
which can be a valid approach in some cases.master
also denies an app from utilizing sudden termination in the case of automatic installs.SPUUpdaterSetttings
class.master
's logic for automatically downloading updates depends on system write access which is no good here.master
has no need for this now.The text was updated successfully, but these errors were encountered: