lib/gretel/trails/stores/url_store.rb
# Securely decodes a URL trail string to encoded array.
Securely decodes a URL trail string to encoded array.
Securely decodes a URL trail string to encoded array .
def retrieve(key)
          hash, base64 = key.split("_", 2)
          if base64.blank?
            Rails.logger.info "[Gretel] Trail decode failed: No Base64 in trail"
            []
          elsif hash == generate_hash(base64)
            decode_base64(base64)
          else
            Rails.logger.info "[Gretel] Trail decode failed: Invalid hash '#{hash}' in trail"
            []
          end
        end
def retrieve ( key ) hash , base64 = key . split ( "_" , 2 ) if base64 . blank? Rails . logger . info "[Gretel] Trail decode failed: No Base64 in trail" [ ] elsif hash == generate_hash ( base64 ) decode_base64 ( base64 ) else Rails . logger . info "[Gretel] Trail decode failed: Invalid hash '#{hash}' in trail" [ ] end end
Securely decodes a URL trail string to encoded array.
Securely decodes a URL trail string to encoded array .
key
<not_specific>