diff --git a/cmd/admin.go b/cmd/admin.go
index 6c79141ea..4fb0810c6 100644
--- a/cmd/admin.go
+++ b/cmd/admin.go
@@ -73,6 +73,11 @@ var (
Value: "",
Usage: "New password to set for user",
},
+ cli.StringFlag{
+ Name: "config, c",
+ Value: "custom/conf/app.ini",
+ Usage: "Custom configuration file path",
+ },
},
}
@@ -123,6 +128,10 @@ func runChangePassword(c *cli.Context) error {
return err
}
+ if c.IsSet("config") {
+ setting.CustomConf = c.String("config")
+ }
+
if err := initDB(); err != nil {
return err
}
diff --git a/docs/content/doc/usage/command-line.md b/docs/content/doc/usage/command-line.md
index 9c16d4904..a7a10b4e4 100644
--- a/docs/content/doc/usage/command-line.md
+++ b/docs/content/doc/usage/command-line.md
@@ -62,6 +62,7 @@ Admin operations:
- Options:
- `--username value`, `-u value`: Username. Required.
- `--password value`, `-p value`: New password. Required.
+ - `--config path`: Gitea configuration file path. Optional. (default: custom/conf/app.ini).
- Examples:
- `gitea admin change-password --username myname --password asecurepassword`
- `regenerate`
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index e510e9954..8cf6111c6 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -213,7 +213,7 @@ send_reset_mail = Click here to resend your password reset email
reset_password = Reset Your Password
invalid_code = Your confirmation code is invalid or has expired.
reset_password_helper = Click here to reset your password
-password_too_short = Password length cannot be less then %d.
+password_too_short = Password length cannot be less than %d characters.
non_local_account = Non-local users can not update their password through the Gitea web interface.
verify = Verify
scratch_code = Scratch code
diff --git a/options/locale/locale_uk-UA.ini b/options/locale/locale_uk-UA.ini
index 70d31b18e..4fae01062 100644
--- a/options/locale/locale_uk-UA.ini
+++ b/options/locale/locale_uk-UA.ini
@@ -266,6 +266,8 @@ email_been_used=Ця електронна адреса вже використо
openid_been_used=OpenID адреса '%s' вже використовується.
username_password_incorrect=Неправильне ім'я користувача або пароль.
enterred_invalid_repo_name=Невірно введено ім'я репозиторію.
+enterred_invalid_owner_name=Ім'я нового власника не є дійсним.
+enterred_invalid_password=Введений вами пароль некоректний.
user_not_exist=Даний користувач не існує.
cannot_add_org_to_team=Організацію неможливо додати як учасника команди.
@@ -365,6 +367,7 @@ key_id=ID ключа
key_name=Ім'я ключа
key_content=Зміст
add_key_success=SSH ключ '%s' додано.
+add_gpg_key_success=GPG ключ '%s' додано.
delete_key=Видалити
ssh_key_deletion=Видалити SSH ключ
gpg_key_deletion=Видалити GPG ключ
@@ -972,6 +975,7 @@ org_desc=Опис
team_name=Назва команди
team_desc=Опис
team_name_helper=Назва команди має бути простою та зрозумілою.
+team_desc_helper=Опишіть мету або роль команди.
team_permission_desc=Права доступу
team_unit_desc=Дозволити доступ до розділів репозиторію
@@ -984,6 +988,8 @@ settings.website=Веб-сайт
settings.location=Розташування
settings.update_settings=Оновити налаштування
settings.update_setting_success=Налаштування організації оновлені.
+settings.change_orgname_prompt=Ця зміна змінить посилання на організацію.
+settings.update_avatar_success=Аватар організації оновлений.
settings.delete=Видалити організацію
settings.delete_account=Видалити цю організацію
settings.confirm_delete_account=Підтвердіть видалення
@@ -1049,9 +1055,11 @@ dashboard.delete_inactivate_accounts_success=Усі неактивні облі
dashboard.delete_repo_archives=Видалити всі архіви репозиторіїв
dashboard.git_gc_repos_success=Всі репозиторії завершили збирання сміття.
dashboard.server_uptime=Uptime серверу
+dashboard.current_goroutine=Поточна кількість Goroutines
dashboard.current_memory_usage=Поточне використання пам'яті
dashboard.total_memory_allocated=Виділено пам'яті загалом
dashboard.memory_obtained=Отримано пам'яті
+dashboard.pointer_lookup_times=Пошуків вказівника
dashboard.memory_allocate_times=Виділення пам'яті
dashboard.current_heap_usage=Поточне використання динамічної пам'яті
dashboard.heap_memory_obtained=Отримано динамічної пам'яті
@@ -1059,6 +1067,7 @@ dashboard.heap_memory_idle=Не використовується динаміч
dashboard.heap_memory_in_use=Використовується динамічною пам'яттю
dashboard.heap_memory_released=Звільнено динамічної пам'яті
dashboard.heap_objects=Об'єктів динамічної пам'яті
+dashboard.bootstrap_stack_usage=Використання стеку Bootstrap
dashboard.stack_memory_obtained=Зайнято пам'яті стеком
dashboard.mspan_structures_usage=Використання структур MSpan
dashboard.mspan_structures_obtained=Отримано структур MSpan
@@ -1133,6 +1142,7 @@ auths.bind_dn=Прив'язати DN
auths.bind_password=Прив'язати пароль
auths.user_base=База пошуку користувачів
auths.user_dn=DN користувача
+auths.attribute_username=Атрибут імені користувача
auths.search_page_size=Розмір сторінки
auths.filter=Користувацький фільтр
auths.admin_filter=Фільтр адміністратора
@@ -1276,12 +1286,14 @@ monitor.name=Ім'я
monitor.schedule=Розклад
monitor.next=Наступного разу
monitor.previous=Попереднього разу
+monitor.execute_times=Кількість виконань
monitor.process=Запущені процеси
monitor.desc=Опис
monitor.start=Час початку
monitor.execute_time=Час виконання
notices.system_notice_list=Сповіщення системи
+notices.view_detail_header=Переглянути деталі повідомлення
notices.actions=Дії
notices.select_all=Вибрати все
notices.deselect_all=Скасувати виділення
@@ -1336,6 +1348,7 @@ raw_minutes=хвилини
[dropzone]
default_message=Перетягніть файли або натисніть тут, щоб завантажити.
+invalid_input_type=Ви не можете завантажувати файли цього типу.
file_too_big=Розмір файлу ({{filesize}} MB), що більше ніж максимальний розмір: ({{maxFilesize}} MB).
remove_file=Видалити файл
diff --git a/routers/repo/view.go b/routers/repo/view.go
index d2efe3009..4f1deeae4 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -105,7 +105,9 @@ func renderDirectory(ctx *context.Context, treeLink string) {
ctx.Data["FileContent"] = string(markup.Render(readmeFile.Name(), buf, treeLink, ctx.Repo.Repository.ComposeMetas()))
} else {
ctx.Data["IsRenderedHTML"] = true
- ctx.Data["FileContent"] = string(bytes.Replace(buf, []byte("\n"), []byte(`
`), -1))
+ ctx.Data["FileContent"] = strings.Replace(
+ gotemplate.HTMLEscapeString(string(buf)), "\n", `
`, -1,
+ )
}
}
}
@@ -208,7 +210,9 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
ctx.Data["FileContent"] = string(markup.Render(blob.Name(), buf, path.Dir(treeLink), ctx.Repo.Repository.ComposeMetas()))
} else if readmeExist {
ctx.Data["IsRenderedHTML"] = true
- ctx.Data["FileContent"] = string(bytes.Replace(buf, []byte("\n"), []byte(`
`), -1))
+ ctx.Data["FileContent"] = strings.Replace(
+ gotemplate.HTMLEscapeString(string(buf)), "\n", `
`, -1,
+ )
} else {
// Building code view blocks with line number on server side.
var fileContent string
diff --git a/templates/admin/monitor.tmpl b/templates/admin/monitor.tmpl
index ceca29146..6cc927d68 100644
--- a/templates/admin/monitor.tmpl
+++ b/templates/admin/monitor.tmpl
@@ -49,8 +49,8 @@