Re: PSA: Does your app use Sparkle? Update it, or use an HTTPS server

2016-02-11 Thread Jean-Daniel Dupas

> Le 11 févr. 2016 à 02:16, Ben Kennedy  a écrit :
> 
>> On 10 Feb 2016, at 5:00 pm, Gary L. Wade  
>> wrote:
>> 
>> You've made my point. None of my friends would even bother with looking at 
>> the certificate for his site (assuming that's his site from his email 
>> address) and move on. At worst, they'd call me and I'd say don't go there 
>> since I don't want them to screenshot that and text it to me to figure it 
>> out.
> 
> No, you are misunderstanding me.  My point is that it may not be valid to 
> assume the web server at 213.186.33.24 (to which xenonium.com resolves) will 
> answer to HTTPS with a cert for "xenonium.com".
> 
> For example, https://213.186.33.24 presents the same "hostname mismatch" 
> alert, because the cert is not named for "213.186.33.24".
> 
> Conduct the same exercise for any A record returned for www.apple.com, and 
> you'll also get this result.  Completely expected.
> 
> Now, if Jean-Daniel has stated definitively that https://xenonium.com is 
> expected to serve up a matching certificate, you have an argument I would 
> agree with.  But for all we know (unless I've missed it), he's serving his 
> material at https://ssl13.ovh.net.
> 
> b

Sorry for the confusion. I’m not taking about that web site. It is on a 
mutualized hosting platform that forces me to pay to install a certificate that 
match my hostname.

If I need to distribute secure content from that site, I can use the 
alternative access URL https://ssl13.ovh.net/~xenonium/ 
.





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Deleting an file that's been NSData memory mapped - safe?

2016-02-11 Thread Dan Lau
If a file has its contents mapped using NSData's
initWithContentsOfFile + NSDataReadingMappedIfSafe,
deleting it doesn't appear to affect reading it's mapped contents. Does
anyone know if NSData uses mmap(2) under the hood to ensure that this sort
of operation is valid?

Dan
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: OT? Xcode Question

2016-02-11 Thread Quincey Morris
On Feb 11, 2016, at 07:49 , Charles Jenkins  wrote:
> 
> With no close button on the left side to give me a one-click solution, it 
> would be mighty handy to find two quick keystrokes that would result in 
> leaving the right-side file open in the main editor.

So you want something like “Open in Primary Editor”  — which you’ll find on 
the right click context menu in the assistant editor, or on the Navigate menu, 
or Command-Option-Comma?

Admittedly, that doesn’t close the assistant editor, so you’d need 
Command-Return too, and if the focus was in the primary editor you’d have to 
switch to the assistant editor first, making the keyboard sequence be:

Command-Option-`Command-Option-Comma
Command-Return

But it’s only two steps with the mouse: right-click and left-click.

Is that the sort of thing you were looking for?

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Deleting an file that's been NSData memory mapped - safe?

2016-02-11 Thread Jens Alfke

> On Feb 11, 2016, at 11:44 AM, Dan Lau  wrote:
> 
> If a file has its contents mapped using NSData's
> initWithContentsOfFile + NSDataReadingMappedIfSafe,
> deleting it doesn't appear to affect reading it's mapped contents. Does
> anyone know if NSData uses mmap(2) under the hood to ensure that this sort
> of operation is valid?

Yes. (mmap() is the only way to memory-map a file, that I know of.)

You can delete a memory-mapped file without problems, for the same reason you 
can delete an open file and keep reading/writing it. Files are 
reference-counted, and the filesystem doesn’t delete a file until its number of 
links goes to zero. An open file handle counts as a link.

Also note that NSDataReadingMappedIfSafe won’t always map the file. I think the 
rule is that files on external filesystems won’t be mapped, just copied into 
memory. The reason is that if the filesystem is unexpectedly disconnected, 
accessing the mapped memory will crash with a segfault.

—Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Deleting an file that's been NSData memory mapped - safe?

2016-02-11 Thread Dan Lau
Thanks Jens, that makes sense.

This brings up a related question that I haven't seen a definitive answer
to - on iOS, does NSDataReadingMappedIfSafe always map the file? After all,
the iOS apps can only reference local files on the device.

On Thu, Feb 11, 2016 at 12:03 PM, Jens Alfke  wrote:

>
> On Feb 11, 2016, at 11:44 AM, Dan Lau  wrote:
>
> If a file has its contents mapped using NSData's
> initWithContentsOfFile + NSDataReadingMappedIfSafe,
> deleting it doesn't appear to affect reading it's mapped contents. Does
> anyone know if NSData uses mmap(2) under the hood to ensure that this sort
> of operation is valid?
>
>
> Yes. (mmap() is the only way to memory-map a file, that I know of.)
>
> You can delete a memory-mapped file without problems, for the same reason
> you can delete an open file and keep reading/writing it. Files are
> reference-counted, and the filesystem doesn’t delete a file until its
> number of links goes to zero. An open file handle counts as a link.
>
> Also note that NSDataReadingMappedIfSafe won’t always map the file. I
> think the rule is that files on external filesystems won’t be mapped, just
> copied into memory. The reason is that if the filesystem is unexpectedly
> disconnected, accessing the mapped memory will crash with a segfault.
>
> —Jens
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: PSA: Does your app use Sparkle? Update it, or use an HTTPS server

2016-02-11 Thread sqwarqDev
Thanks largely to folks over on the AppleScript users list, the rough script I 
was providing yesterday has been significantly improved. Here’s the latest 
version. 

Credits go to Al Varnell and Yvan Koenig for suggestions and rewriting of my 
earlier drafts.

Added: apps in  /Applications subfolders 
Added: Pref Panes that use Sparkle
Added:  anything with .app extension outside of /Applications.
Added: counter showing number of vulnerable files found
Added: ability to view the compete list in TextExit, allowing saving and, more 
importantly, viewing the whole list, which could be truncated in the dialog box.




#script version 1.51
set foundCounter to 0
set infoFilePath to "/Contents/info.plist"

set theApps to do shell script "mdfind kMDItemFSName == '*.prefPane' & mdfind 
kMDItemFSName == '*.app'"
set theApps to theApps & (do shell script "mdfind -onlyin /Applications " & 
quote & "kMDItemFSName == '*.app'" & quote)
set theApps to paragraphs of theApps
set sparkleAppsList to {}
tell application "System Events"
repeat with anApp in theApps
set anApp to anApp as text
if exists disk item (anApp & 
"/Contents/Frameworks/Sparkle.framework") then
try
set thePlist to contents of property list file 
(anApp & infoFilePath)
set theValue to value of thePlist
try
set thisSUFeedURL to SUFeedURL of 
theValue as text
if thisSUFeedURL contains "http:" then
set end of sparkleAppsList to 
"Application : " & anApp & " : " & thisSUFeedURL & linefeed & linefeed
set foundCounter to 
foundCounter + 1
end if
end try
end try
end if
end repeat
end tell

display dialog "Found: " & foundCounter & " apps that do not use secure https 
connections for the Sparkle updater:

" & sparkleAppsList buttons {"Save List", "OK"} default button "OK" with title 
"Sparkle Framework Vulnerability Check"

set aResponse to text of the result

if aResponse contains "Save List" then
tell application "TextEdit"
activate
make new document
set text of document 1 to sparkleAppsList as text
end tell
end if
#EOF
















___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

OT? Xcode Question

2016-02-11 Thread Charles Jenkins
I find that when working with an Assistant Editor, I’m typically doing things 
like creating outlets and actions, where I’m dragging from IB on the left into 
companion code on the right. Then I’m done with the left side and need to start 
working on the right side.

So what I almost always want to do is close the file on the left side; but 
XCode only offers a way to quickly get rid of the right side. It takes some 
thought and clicking around to get back to the place I need to work.

Is there a keystroke I could use to SWAP the content of the left and right 
panes? I’ve looked around in the menus to find it, but no luck so far.

With no close button on the left side to give me a one-click solution, it would 
be mighty handy to find two quick keystrokes that would result in leaving the 
right-side file open in the main editor.

-- 

Charles
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: OT? Xcode Question

2016-02-11 Thread Alex Zavatone
There is an Xcode mailing list that you might want to post this to.

Xcode-users Users 




On Feb 11, 2016, at 10:49 AM, Charles Jenkins wrote:

> I find that when working with an Assistant Editor, I’m typically doing things 
> like creating outlets and actions, where I’m dragging from IB on the left 
> into companion code on the right. Then I’m done with the left side and need 
> to start working on the right side.
> 
> So what I almost always want to do is close the file on the left side; but 
> XCode only offers a way to quickly get rid of the right side. It takes some 
> thought and clicking around to get back to the place I need to work.
> 
> Is there a keystroke I could use to SWAP the content of the left and right 
> panes? I’ve looked around in the menus to find it, but no luck so far.
> 
> With no close button on the left side to give me a one-click solution, it 
> would be mighty handy to find two quick keystrokes that would result in 
> leaving the right-side file open in the main editor.
> 
> -- 
> 
> Charles
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: TreeController and "selection" Binding

2016-02-11 Thread Quincey Morris
On Feb 11, 2016, at 13:26 , Michael de Haan  wrote:
> 
> Currently, I obtain the “selection” of the treeController by implementing and 
> outlet to the controller, and using the “selectionIndexPaths” binding to 
> update a local variable which holds the selected range information. From 
> then, another function implements the highlight. It works, but it seems 
> awfully klunky.
> 
> Ideally, I would like to bind from IB the selection of the TreeController to 
> the local variable, but I cannot find a way to do this. Is this possible?

It’s not clear what you’re saying. NSTreeController supports a 
“selectionIndexPaths” binding that can be bound to a NSArray property via 
File’s Owner. [That sentence needs to be rephrased if you’re using Swift, or 
storyboards, but I’m assuming Obj-C and a XIB by default.] Your first quoted 
paragraph seems to say that this binding is bound, although it’s unclear how 
the outlet to the controller fits in.

The second quoted paragraph says you would like to do the thing that is 
apparently described by the first paragraph, hence my confusion. If it were 
bound in this way, you would still have “From then, another function implements 
…”, so isn’t that still clunky?

Or are you saying you’re currently observing the tree controller’s 
“selectionIndexPaths” *property* (not *binding*) using KVO or something else, 
and *that’s* what’s clunky?

Again, you can already do the thing you’re asking for. In IB, you can bind the 
NSTreeController’s “selectionIndexPaths” binding to something in a data model.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: OT? Xcode Question

2016-02-11 Thread Quincey Morris
On Feb 11, 2016, at 16:15 , Charles Jenkins  wrote:
> 
> I was hoping for something simpler than all that

I think I agree with you that a more direct solution would be worth campaigning 
for. View -> Standard Editor -> Show Standard Editor (Command-Return) is the 
direct way to go from a dual-panel view to a single-pane view. It would be nice 
if there was a variant that goes to a single-pane view with the content of the 
RHS instead of the LHS. Command-Option-Return would be logical (Option always 
modifies a function to apply to the assistant editor instead), but 
unfortunately that’s already used for something important, so finding a 
convenient key equivalent might be tricky.

But I hope you submit a bug report asking for the function anyway.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: OT? Xcode Question

2016-02-11 Thread Charles Jenkins
Well, clearly I was hoping for something simpler than all that :-D

I found a drag-and-click operation that seems to work, mostly. Drag the proxy 
icon from the Assistant Editor’s file over the icon for the file in the main 
editor, then click the X at the far right of the Assistant Editor window. That 
leaves me with the right file in the main editor, even though the wrong item is 
highlighted in the source list.

-- 

Charles

On February 11, 2016 at 2:17:01 PM, Quincey Morris 
(quinceymor...@rivergatesoftware.com) wrote:

On Feb 11, 2016, at 07:49 , Charles Jenkins  wrote:

With no close button on the left side to give me a one-click solution, it would 
be mighty handy to find two quick keystrokes that would result in leaving the 
right-side file open in the main editor.

So you want something like “Open in Primary Editor” — which you’ll find on the 
right click context menu in the assistant editor, or on the Navigate menu, or 
Command-Option-Comma?

Admittedly, that doesn’t close the assistant editor, so you’d need 
Command-Return too, and if the focus was in the primary editor you’d have to 
switch to the assistant editor first, making the keyboard sequence be:

Command-Option-` Command-Option-Comma Command-Return

But it’s only two steps with the mouse: right-click and left-click.

Is that the sort of thing you were looking for?

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Full-text indexing on iOS

2016-02-11 Thread Jens Alfke
I’m looking into OS support for full-text indexing, for the database engine I 
work on. On Mac OS, there’s SearchKit, which does exactly what I want. iOS 
doesn’t have SearchKit for some reason, but it now has Core Spotlight, which 
lets me index data. The intended use seems to be for device-wide searching in 
the home screen’s search UI. Can I instead use it for my own queries?

iOS does have NSMetadataQuery, for querying Spotlight. Can I use this to search 
only the data I’ve indexed, without results from other apps? And conversely, is 
there a way to keep the data I’ve indexed from showing up in the system-wide 
Spotlight results?

—Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Full-text indexing on iOS

2016-02-11 Thread Alex Zavatone
I'm sure you're already done this, but searching on your exact request gives 2 
URLs in Google.

The first is a link to your product unsurprisingly.

The second is a project from 2015 that claims to do what you might want.

I think a quick look at the second project might help to at least see if this 
guy went down the path you are plan to go.

Query:
http://www.google.com/search?client=safari=en=ios+full+text+indexing=UTF-8=UTF-8

First link to some Couchbase project:
https://github.com/Blue-Rocket/BRFullTextSearch

Project from second link that claims iOS Full Text Search
https://github.com/Blue-Rocket/BRFullTextSearch


Wish I had a more useful answer.




On Feb 11, 2016, at 4:05 PM, Jens Alfke wrote:

> I’m looking into OS support for full-text indexing, for the database engine I 
> work on. On Mac OS, there’s SearchKit, which does exactly what I want. iOS 
> doesn’t have SearchKit for some reason, but it now has Core Spotlight, which 
> lets me index data. The intended use seems to be for device-wide searching in 
> the home screen’s search UI. Can I instead use it for my own queries?
> 
> iOS does have NSMetadataQuery, for querying Spotlight. Can I use this to 
> search only the data I’ve indexed, without results from other apps? And 
> conversely, is there a way to keep the data I’ve indexed from showing up in 
> the system-wide Spotlight results?
> 
> —Jens
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

TreeController and "selection" Binding

2016-02-11 Thread Michael de Haan
I have what I assume is a standard setup.   A treeController managing an 
Outline View.  A textView acts as a source for a regex Search. All works as 
expected. The resulting matches are displayed in the outline view.

As I select a row in the outline view, I highlight the matched text in the 
original source.

Currently, I obtain the “selection” of the treeController by implementing and 
outlet to the controller, and using the “selectionIndexPaths” binding to update 
a local variable which holds the selected range information. From then, another 
function implements the highlight. It works, but it seems awfully klunky.

Ideally, I would like to bind from IB the selection of the TreeController to 
the local variable, but I cannot find a way to do this. Is this possible?

Thanks.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com