fixed:代码回退

This commit is contained in:
yystopf 2026-01-28 16:09:15 +08:00
parent c8b80c04d6
commit bf4ff93ed9
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ class RepositoriesController < ApplicationController
api_url = GiteaService.gitea_config[:base_url]
tip_exception('不可访问') if params[:filepath].to_s.include?("chinese_dictionary.txt")
url = "/repos/#{@owner.login}/#{@repository.identifier}/raw/#{URI.escape(params[:filepath])}?ref=#{URI.escape(params[:ref])}"
url = "/repos/#{@owner.login}/#{@repository.identifier}/raw/#{CGI.escape(params[:filepath])}?ref=#{CGI.escape(params[:ref])}"
file_path = [domain, api_url, url].join
file_path = [file_path, "access_token=#{@owner&.gitea_token}"].join("&")