lib/cloudinary/auth_token.rb in cloudinary-1.21.0 vs lib/cloudinary/auth_token.rb in cloudinary-1.22.0
- old
+ new
@@ -41,10 +41,10 @@
token << "ip=#{ip}" if ip
token << "st=#{start}" if start
token << "exp=#{expiration}"
token << "acl=#{escape_to_lower(acl)}" if acl
to_sign = token.clone
- to_sign << "url=#{escape_to_lower(url)}" if url
+ to_sign << "url=#{escape_to_lower(url)}" if url && acl.blank?
auth = digest(to_sign.join(SEPARATOR), key)
token << "hmac=#{auth}"
"#{name}=#{token.join(SEPARATOR)}"
end