Browse Source

fix: escape

tags/v4.0.0^2
yystopf 4 years ago
parent
commit
78f464ccba
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/controllers/repositories_controller.rb

+ 1
- 1
app/controllers/repositories_controller.rb View File

@@ -252,7 +252,7 @@ class RepositoriesController < ApplicationController
domain = Gitea.gitea_config[:domain]
api_url = Gitea.gitea_config[:base_url]
url = "/repos/#{@owner.login}/#{@repository.identifier}/raw/#{params[:filepath]}?ref=#{CGI.escapte(params[:ref])}"
url = "/repos/#{@owner.login}/#{@repository.identifier}/raw/#{URI.escape(params[:filepath])}?ref=#{CGI.escape(params[:ref])}"
file_path = [domain, api_url, url].join
file_path = [file_path, "access_token=#{current_user&.gitea_token}"].join("&")


Loading…
Cancel
Save