The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus 1 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
New Version of OmniFocus Web Interface [Old Thread] Thread Tools Search this Thread Display Modes
Ok, to enable SSL in WEBrick, you must get the environment variable USE_SSL set to something ("true" works fine). There are multiple ways to skin this cat, but the simplest in my opinion would be to edit the file script/server and add this line after the first line which specifies the ruby interpreter:

ENV["USE_SSL"] = "true"

So, the file then looks like this:

#!/usr/bin/ruby
ENV["USE_SSL"] = "true"
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/server'


The reason this works is because environment.rb will dynamically redefine the initialize method for the HTTP server to force SSL as long as ENV["USE_SSL"] evaluates to something.

Note that this will _still_ start WEBrick up on port 3000, and it is not a mixed-mode server, it will only support HTTPS at that point. Also it's using a locally-generated certificate, which your browser may require you to jump through some hoops to trust. Another thing, assuming you are port-forwarding, the host name of your NAT device and the hostname of your OmniFocus box are not likely to be the same. This means your browser will additionally complain about a name mismatch in the cert. You can fix this by changing a line near the end of config/environment.rb:

:SSLCertName => [ [ "CN", WEBrick::Utils::getservername ] ]

Replace the WEBrick::Utils::getservername bit with the DNS of your NAT device and this warning should go away.

If all of that is too complicated, you don't have to do it, just edit script/server as described at the top of this post and you'll probably be fine.

James

Last edited by jwaldrop; 2007-10-24 at 06:20 PM..
 
Btw, if you end up doing this, the first time you restart WEBrick you're likely to get an error the next time you hit the site that says the certificate it's presenting uses the same serial number as another certificate from the same authority. This is due to a bug in WEBrick -- certificate serial numbers are meant to be a unique positive number, but WEBrick's ssl.rb has the following line:

cert.serial = 0

This means every time it runs, it creates a new certificate (this is fine given that you're not giving it a real certificate to use) -- but it generates the new certificate with the same serial number every time, and a solid SSL implementation will declare the new certificate invalid at the client side (Firefox definitely does this).

The solution is to patch WEBrick, so you have to go and find it's ssl.rb -- on my system it's in /opt/local/lib/ruby/1.8/webrick, but it's likely to be elsewhere for most people. For me that line is 54, but it should be easy to find regardless. You can change it to this:

cert.serial = Time.now.to_i

That means it will get a new serial number every time you restart the server, provided you don't restart extremely rapidly. ;)
 
I am very much looking forward to installing the web-app. I read through the complete post, and I am unsure as to whether the original instructions still do the trick.

If anyone can summarize how to install and how to access the taks in the iPhone (or how to publish to the web) that would be great. I joined OmniFocus app after the web support was eliminated so I kind of lack the context.

I would really appreciate it! Thanks.
 
Here's instructions that will work as long as you are comfortable with working in a shell:

1) Download the zip dansays posted

2) Unpack it. It doesn't really matter where, or what you name it, but make sure you can get back there

3) cd into the new directory (by default named Web Interface)

4) Edit config/Settings.plist, as described in my post on the subject, you'll need to put a username and password in at the bare minimum

5) from a shell, run: script/server

6) from a browser, connect to localhost:3000, you should be prompted for a username and password to login, which will be the ones you set in Settings.plist.

7) If you want to access this site from the public Internet, ie when you're travelling, you must have a valid public IP address that you control and can either directly run OmniFocus on (ie, it's a Mac that is on the public net for whatever reason) or port forward from a NAT device to the Mac on your internal network that is running OmniFocus. I'm not going to attempt to explain this in any more detail than that, your network device will have documentation on how to setup port forwarding.

If any of this doesn't work, freel free to post here.
 
FWIW, it should be relatively easy to write an installer that will install all of this and set it up so that it will run in daemon mode every time you restart the server. I think doing that should wait for official word from Omni as to whether or not they're going to maintain this in the long run.

It's really a seperate component, though, except for the fact that OmniFocus needs to be running for it to work. It could just as easily start OmniFocus as OmniFocus could start it.

I'm also not going to personally be making major changes to the codebase until I know what's going to happen to it, since managing multiple sets of patches without a versioning system is painful, and putting it under something like Rubyforge would have to be approved by Omni, since they own the copyright on the current code. It could be replicated of course, if necessary, but I don't see why that would be desirable.
 
Thanks SO much. I appreciate it. I might wait a bit to see if eventually and installer is made. I am quite new in the mac platform, and many of the things you mention I am not yet quite comfrotable with. I'll follow this topics to see what happens. Thanks a lot.
 
Submitting this to rubyforge (or some other open source repository) sounds great. Here's the (MIT-esque) copyright we'd like to see on that code:

Quote:
Copyright 2007 Omni Development, Inc. All rights reserved.

OPEN PERMISSION TO USE AND REPRODUCE OMNI SOURCE CODE SOFTWARE

Omni Source Code software is available from The Omni Group on their web
site at www.omnigroup.com.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

Any original copyright notices and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
I'm sorry we haven't had much time to move forward with this (applying the copyright, publishing it somewhere); if anyone would like to help us with this, we welcome your assistance!
 
Quote:
Originally Posted by Ken Case View Post
I'm sorry we haven't had much time to move forward with this (applying the copyright, publishing it somewhere); if anyone would like to help us with this, we welcome your assistance!
What would be needed in terms of publishing it? I have enough bandwidth to spare. Do we need something like a CMS? Or just a web page with a download?

Jim
 
No need for bandwidth, we mostly just need permission to go forth and make it prosper. Sounds like we have that (thanks Ken Case!), so we should put it on ruby-forge. It could go elsewhere, but given that it's a Rails app, that's its most natural home.

At any rate, definitely need to move this discussion to the third party forum now. :)

James
 
Is it working with Leopard?

I can not start up the server anymore.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
OmniFocus web interface amelchi OmniFocus 1 for Mac 3 2012-07-08 07:35 PM
Does OmniFocus show when something was completed? [A: Yes - see thread!] keypix OmniFocus 1 for Mac 3 2010-10-28 01:10 PM
OmniFocus for iPad interface feedback bnz OmniFocus for iPad 105 2010-07-12 01:49 AM
OmniFocus and Mac User Interface Conventions jashan OmniFocus 1 for Mac 9 2010-06-06 01:15 PM
OmniFocus Web Interface still running. How can I disable it? aaffleck OmniFocus 1 for Mac 7 2008-01-25 04:42 PM


All times are GMT -8. The time now is 12:53 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.