Permalink
Browse files

Added url.strip! to account for spaces. URI::split(url) was bombing i…

…f url contained spaces.
  • Loading branch information...
1 parent 8f18eed commit c73c785097e0c3865a5a96c3d7b9dd3b2c7581da @stonean stonean committed Jun 19, 2008
Showing with 9 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +3 −0 History.txt
  3. +4 −0 lib/lockdown/controller.rb
  4. +1 −1 lib/lockdown/version.rb
View
@@ -3,3 +3,4 @@
nbproject/**
pkg/**
doc/**
+email.txt
View
@@ -1,3 +1,6 @@
+== 0.5.9 2008-06-19
+* Fixed: Added url.strip! to account for spaces. URI::split(url) was bombing if url contained spaces.
+
== 0.5.8 2008-06-17
* Fixed: External links are no longer restricted by link_to security.
* Modified: Name of migration that adds admin user.
@@ -160,8 +160,12 @@ def sent_from_uri
end
def authorized?(url)
+ return false unless url
+
return true if current_user_is_admin?
+ url.strip!
+
url_parts = URI::split(url)
path = url_parts[5]
View
@@ -2,7 +2,7 @@ module Lockdown #:nodoc:
module VERSION #:nodoc:
MAJOR = 0
MINOR = 5
- TINY = 8
+ TINY = 9
STRING = [MAJOR, MINOR, TINY].join('.')
end

0 comments on commit c73c785

Please sign in to comment.