Files
anonymous_github/public/i18n/locale-en.json
T
tdurieuxandClaude Opus 4.7 5b72b630c4 fix: silent-truncation, token-refresh, and content-type bugs across hot paths
Follow-up review pass after the cache fixes turned up several bugs in
the same family — silent failures that look like success to the client,
plus content-correctness issues in the ZIP and per-file delivery paths.

- zipStream: stop calling archive.finalize() on upstream/parser errors.
  That produced a valid-looking ZIP (200 OK, archive opens) silently
  missing entries — same class as #694, but worse because the user has
  no signal anything went wrong. Destroy the response on failure
  instead so the client sees a connection drop.
- zipStream: apply per-repo image/pdf gates inside the entry handler.
  The single-file /file/... endpoint refuses to serve those types
  via AnonymizedFile.isFileSupported when image=false / pdf=false, but
  the ZIP shipped them anyway — privacy-relevant for maintainers who
  toggle image=false to suppress identifying screenshots. Threaded
  contentOptions through both ZIP entry points (direct and streamer).
- GitHubUtils.getToken: validate the OAuth token-refresh response
  before persisting. On a non-2xx response or a body without a string
  token, we used to overwrite the stored token with `undefined`, which
  then propagated as `Authorization: token undefined` to every API
  call — 401 even on public repos, with the config.GITHUB_TOKEN
  fallback unreachable because the field was no longer falsy.
- AnonymizedFile.send (streamer branch): forward Content-Type from the
  upstream streamer response. got.stream(...).pipe(res) carries body
  bytes only, so the parent response had no Content-Type and browsers
  guessed (text rendered as download, etc.). Also resolve on
  res.on("finish") in addition to "close" — keep-alive sockets stay
  open long after the response is delivered, delaying countView().
- Repository.updateIfNeeded: persist a renamed source.repositoryName
  even when the commit hasn't changed. Previously the new value lived
  in memory only and was overwritten on the next reload, so the
  rename detection ran every request.
- Repository.anonymize: stop materialising a dummy {path:"",name:""}
  FileModel for empty repos. That row collided with the special case
  in AnonymizedFile.getFileInfo and surfaced in unfiltered listings.
- streamer/route POST /: reject filePath segments containing ".." or
  empty parts. Defence in depth — the parent server validates against
  FileModel before calling, but the streamer joins filePath straight
  into the storage path, so any future caller forwarding an
  unvalidated path could traverse out of the repo root.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 09:19:05 +03:00

108 lines
7.7 KiB
JSON

{
"ERRORS": {
"unknown_error": "Unknown error, contact the admin.",
"unreachable": "Anonymous GitHub is unreachable, contact the admin.",
"request_error": "Unable to download the file, check your connection or contact the admin.",
"not_found": "The requested resource could not be found.",
"not_connected": "You must be logged in to perform this action.",
"not_authorized": "You do not have permission to perform this action.",
"unable_to_connect_user": "Unable to connect your account. Please try again later.",
"user_not_found": "The requested user could not be found.",
"repo_access_limited": "Access to repository limited by org.",
"repo_not_found": "The repository is not found.",
"repo_empty": "The source repository is empty on GitHub.",
"repo_not_accessible": "Anonymous GitHub is unable to or is forbidden to access the repository.",
"repository_expired": "The repository is expired.",
"repository_not_ready": "Anonymous GitHub is still processing the repository, it can take several minutes.",
"repository_not_accessible": "This repository is currently not accessible.",
"repo_is_updating": "Anonymous GitHub is still processing the repository, it can take several minutes.",
"invalid_repo": "The provided repository is not valid.",
"repoId_not_defined": "A repository ID must be provided.",
"repoUrl_not_defined": "The repository URL needs to be defined.",
"repoId_already_used": "The repository ID is already used.",
"invalid_repoId": "The format of the repository ID is invalid.",
"unsupported_source": "The repository source type is not supported.",
"branch_not_specified": "The branch is not specified.",
"branch_not_found": "The branch of the repository cannot be found.",
"commit_not_specified": "A commit must be specified.",
"invalid_commit_format": "The commit hash format is invalid. It must be a hexadecimal string.",
"pull_request_not_found": "The requested pull request could not be found.",
"pull_request_expired": "This pull request has expired and is no longer available.",
"pull_request_not_ready": "This pull request is still being prepared. Please try again shortly.",
"pull_request_not_available": "This pull request is currently not available.",
"invalid_pullRequestId": "The pull request ID is invalid.",
"pullRequestId_already_used": "This pull request ID is already in use. Please choose a different one.",
"repository_not_specified": "A repository must be specified for this pull request.",
"pullRequestId_not_specified": "A pull request ID must be specified.",
"pullRequestId_is_not_a_number": "The source pull request ID must be a number.",
"options_not_provided": "Anonymization options are mandatory.",
"terms_not_specified": "Anonymization terms must be specified.",
"invalid_terms_format": "Terms are in an invalid format.",
"missing_content": "No content was provided to the anonymization preview.",
"unable_to_anonymize": "An error happened during the anonymization process. Please try later or report the issue.",
"non_supported_mode": "The selected anonymization mode is invalid, only download and stream are supported.",
"invalid_path": "The provided path is invalid or missing.",
"path_not_specified": "A file path must be specified.",
"path_not_defined": "The file path has not been resolved yet.",
"invalid_file_path": "The requested file path is not valid.",
"no_file_selected": "Please select a file.",
"file_not_found": "The requested file is not found.",
"file_not_accessible": "The requested file is not accessible.",
"file_not_supported": "The file type is not supported. Anonymous GitHub cannot handle it.",
"file_too_big": "The file size exceeds the limit of Anonymous GitHub.",
"is_folder": "The path points to a folder.",
"folder_not_supported": "The path points to a folder. Please select a file.",
"unable_to_write_file": "Unable to write file on disk.",
"download_not_enabled": "Repository downloads are not enabled on this server.",
"unable_to_download": "The repository could not be downloaded. Please try again later.",
"s3_config_not_provided": "Object storage has not been configured on this server.",
"stats_unsupported": "Statistics are only supported in download mode.",
"branches_not_found": "The requested branch is not found.",
"readme_not_available": "No README for the repository is found.",
"page_not_supported_on_different_branch": "GitHub Pages is served from a different branch than the one selected. Pick the branch that GitHub Pages is configured to use.",
"page_not_activated": "GitHub Pages is not enabled on this repository. Enable it in the repository settings on GitHub before anonymizing.",
"is_removed": "This resource has been removed and is no longer available.",
"conf_name_missing": "A conference name is required.",
"conf_id_missing": "A conference ID is required.",
"conf_id_used": "This conference ID is already in use. Please choose a different one.",
"conf_start_date_missing": "A start date is required for the conference.",
"conf_end_date_missing": "An end date is required for the conference.",
"conf_start_date_invalid": "The start date must be before the end date.",
"conf_end_date_invalid": "The end date must be in the future.",
"invalid_plan": "The selected plan is not valid.",
"conference_not_found": "The requested conference could not be found.",
"conf_not_found": "The requested conference could not be found.",
"conf_not_activated": "The conference is not activated.",
"billing_missing": "Billing information is required for this plan.",
"billing_name_missing": "A billing name is required.",
"billing_email_missing": "A billing email is required.",
"billing_address_missing": "A billing address is required.",
"billing_city_missing": "A billing city is required.",
"billing_zip_missing": "A billing ZIP/postal code is required.",
"billing_country_missing": "A billing country is required.",
"queue_not_found": "The specified queue could not be found.",
"job_not_found": "The specified job could not be found in the queue.",
"error_retrying_job": "An error occurred while retrying the job.",
"gist_expired": "The gist is expired.",
"gist_not_ready": "Anonymous GitHub is still processing the gist, it can take several minutes.",
"gist_not_found": "The requested gist could not be found.",
"gist_not_available": "This gist is currently not available.",
"invalid_gistId": "The format of the gist ID is invalid.",
"gistId_not_specified": "A gist ID must be provided.",
"gistId_already_used": "The gist ID is already used.",
"missing_token": "An authentication token is required.",
"invalid_token": "The provided authentication token is invalid.",
"login_failed": "Login failed. Please try again.",
"server_error": "An unexpected server error occurred. Please try again later.",
"username_not_defined": "A username must be provided.",
"github_user_not_found": "The specified GitHub user could not be found.",
"cannot_coauthor_self": "You cannot add yourself as a co-author."
},
"WARNINGS": {
"page_not_enabled_on_repo": "GitHub Pages is not enabled on this repository. Enable it in the repository's Settings → Pages on GitHub, then refresh.",
"page_branch_mismatch": "GitHub Pages on this repository is served from the '{{pageBranch}}' branch, but you selected '{{selectedBranch}}'. Switch the branch above to '{{pageBranch}}' to anonymize the Pages site.",
"folder_truncated": "This folder has more than 10,000 entries; only a partial listing is shown.",
"repo_truncated": "Some folders in this repository have too many files to be fully listed. Affected folders are marked with a warning icon."
}
}