This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApiSerializer < ActiveRecord::Serialization::JsonSerializer #:nodoc: | |
def serializable_record | |
@host_name = @options.delete :host | |
@is_supporter = @options.delete :supporter | |
@site_permalink = @options.delete :site_permalink | |
@site_prefix = nil | |
super | |
end | |
def site_prefix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
One of the problems with requiring SSL for all pages in a site is that you can't rely on a lot of the benefits of browser caching. However, many sites DO require login over SSL. | |
During login process, set a LocalStorage private key. This won't be visible to any attacker. | |
Periodically, ask user to encrypt or hash something asymmetrically and send the (public) result back. | |
If a user sends back the same result twice, or it wasn't encrypted correctly, log them out. | |
This may require some way to track individual tabs - if a user opens a new tab/window, there's likely some way to track this. Maybe they can encrypt the last URL they opened, and set that as a cookie. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IMAP = { :user => "[email protected]", :pass => "yourpassword" } | |
namespace :imap do | |
wrapper = nil | |
task :connect do | |
dir = "#{File.dirname(__FILE__)}/../../../../" | |
require 'imap_wrapper' | |
include ImapWrapper::Constants | |
wrapper = ImapWrapper.new(IMAP[:user], IMAP[:pass], ENV['PURGE'], ENV['VERBOSE']) |
OlderNewer