Skip to content

Commit 109b345

Browse files
committed
Merge branch 'main' of https://github.com/go-gitea/gitea into feature-svg-diff
2 parents 758b477 + d6d2444 commit 109b345

25 files changed

+145
-143
lines changed

.drone.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ steps:
503503
pull: always
504504
image: techknowlogick/xgo:go-1.16.x
505505
commands:
506-
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt-get install -y nodejs
506+
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
507507
- export PATH=$PATH:$GOPATH/bin
508508
- make release
509509
environment:
@@ -599,7 +599,7 @@ steps:
599599
pull: always
600600
image: techknowlogick/xgo:go-1.16.x
601601
commands:
602-
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt-get install -y nodejs
602+
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
603603
- export PATH=$PATH:$GOPATH/bin
604604
- make release
605605
environment:

Dockerfile.rootless

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ RUN apk --no-cache add \
3535
ca-certificates \
3636
gettext \
3737
git \
38+
curl \
3839
gnupg
3940

4041
RUN addgroup \

docs/content/doc/developers/hacking-on-gitea.en-us.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ See `make help` for all available `make` targets. Also see [`.drone.yml`](https:
127127

128128
## Building continuously
129129

130-
To run and continously rebuild when source files change:
130+
To run and continuously rebuild when source files change:
131131

132132
```bash
133133
make watch
@@ -216,7 +216,7 @@ You should validate your generated Swagger file and spell-check it with:
216216
make swagger-validate misspell-check
217217
```
218218

219-
You should commit the changed swagger JSON file. The continous integration
219+
You should commit the changed swagger JSON file. The continuous integration
220220
server will check that this has been done using:
221221

222222
```bash
@@ -315,7 +315,7 @@ branches as we will need to update it to main before merging and/or may be
315315
able to help fix issues directly.
316316

317317
Any PR requires two approvals from the Gitea maintainers and needs to pass the
318-
continous integration. Take a look at our
318+
continuous integration. Take a look at our
319319
[`CONTRIBUTING.md`](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md)
320320
document.
321321

docs/content/doc/features/authentication.en-us.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ Adds the following fields:
8888
- Bind Password (optional)
8989

9090
- The password for the Bind DN specified above, if any. _Note: The password
91-
is stored in plaintext at the server. As such, ensure that the Bind DN
92-
has as few privileges as possible._
91+
is stored encrypted with the SECRET_KEY on the server. It is still recommended
92+
to ensure that the Bind DN has as few privileges as possible._
9393

9494
- User Search Base **(required)**
9595

models/login_source.go

+16-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"code.gitea.io/gitea/modules/auth/oauth2"
1919
"code.gitea.io/gitea/modules/auth/pam"
2020
"code.gitea.io/gitea/modules/log"
21+
"code.gitea.io/gitea/modules/secret"
2122
"code.gitea.io/gitea/modules/setting"
2223
"code.gitea.io/gitea/modules/timeutil"
2324
"code.gitea.io/gitea/modules/util"
@@ -77,11 +78,25 @@ type LDAPConfig struct {
7778
// FromDB fills up a LDAPConfig from serialized format.
7879
func (cfg *LDAPConfig) FromDB(bs []byte) error {
7980
json := jsoniter.ConfigCompatibleWithStandardLibrary
80-
return json.Unmarshal(bs, &cfg)
81+
err := json.Unmarshal(bs, &cfg)
82+
if err != nil {
83+
return err
84+
}
85+
if cfg.BindPasswordEncrypt != "" {
86+
cfg.BindPassword, err = secret.DecryptSecret(setting.SecretKey, cfg.BindPasswordEncrypt)
87+
cfg.BindPasswordEncrypt = ""
88+
}
89+
return err
8190
}
8291

8392
// ToDB exports a LDAPConfig to a serialized format.
8493
func (cfg *LDAPConfig) ToDB() ([]byte, error) {
94+
var err error
95+
cfg.BindPasswordEncrypt, err = secret.EncryptSecret(setting.SecretKey, cfg.BindPassword)
96+
if err != nil {
97+
return nil, err
98+
}
99+
cfg.BindPassword = ""
85100
json := jsoniter.ConfigCompatibleWithStandardLibrary
86101
return json.Marshal(cfg)
87102
}

modules/auth/ldap/ldap.go

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ type Source struct {
3535
SecurityProtocol SecurityProtocol
3636
SkipVerify bool
3737
BindDN string // DN to bind with
38+
BindPasswordEncrypt string // Encrypted Bind BN password
3839
BindPassword string // Bind DN password
3940
UserBase string // Base search path for users
4041
UserDN string // Template for the DN of the user for simple auth

options/locale/locale_en-US.ini

-1
Original file line numberDiff line numberDiff line change
@@ -2283,7 +2283,6 @@ auths.host = Host
22832283
auths.port = Port
22842284
auths.bind_dn = Bind DN
22852285
auths.bind_password = Bind Password
2286-
auths.bind_password_helper = Warning: This password is stored in plain text. Use a read-only account if possible.
22872286
auths.user_base = User Search Base
22882287
auths.user_dn = User DN
22892288
auths.attribute_username = Username Attribute

options/locale/locale_es-ES.ini

+12-2
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,7 @@ branch=Rama
854854
tree=Árbol
855855
clear_ref=`Borrar referencia actual`
856856
filter_branch_and_tag=Filtrar por rama o etiqueta
857+
find_tag=Buscar etiqueta
857858
branches=Ramas
858859
tags=Etiquetas
859860
issues=Incidencias
@@ -1158,7 +1159,7 @@ issues.label_color=Color etiqueta
11581159
issues.label_count=%d etiquetas
11591160
issues.label_open_issues=%d incidencias abiertas
11601161
issues.label_edit=Editar
1161-
issues.label_delete=Borrar
1162+
issues.label_delete=Eliminar
11621163
issues.label_modify=Editar etiqueta
11631164
issues.label_deletion=Eliminar etiqueta
11641165
issues.label_deletion_desc=Eliminar una etiqueta la elimina de todos las incidencias. ¿Continuar?
@@ -1284,6 +1285,8 @@ issues.review.resolved_by=ha marcado esta conversación como resuelta
12841285
issues.assignee.error=No todos los asignados fueron añadidos debido a un error inesperado.
12851286
issues.reference_issue.body=Cuerpo
12861287

1288+
compare.compare_base=base
1289+
compare.compare_head=comparar
12871290

12881291
pulls.desc=Activar Pull Requests y revisiones de código.
12891292
pulls.new=Nuevo Pull Request
@@ -1546,6 +1549,7 @@ settings.email_notifications.disable=Deshabilitar las notificaciones por correo
15461549
settings.email_notifications.submit=Establecer Preferencia de correo electrónico
15471550
settings.site=Sitio web
15481551
settings.update_settings=Actualizar configuración
1552+
settings.branches.update_default_branch=Actualizar rama por defecto
15491553
settings.advanced_settings=Ajustes avanzados
15501554
settings.wiki_desc=Activar Wiki de repositorio
15511555
settings.use_internal_wiki=Usar Wiki integrada
@@ -1886,6 +1890,7 @@ diff.file_image_width=Anchura
18861890
diff.file_image_height=Altura
18871891
diff.file_byte_size=Tamaño
18881892
diff.file_suppressed=La diferencia del archivo ha sido suprimido porque es demasiado grande
1893+
diff.file_suppressed_line_too_long=Las diferiencias del archivo han sido suprimidas porque una o mas lineas son muy largas
18891894
diff.too_many_files=Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio
18901895
diff.comment.placeholder=Deja un comentario
18911896
diff.comment.markdown_info=Es posible estilizar con markdown.
@@ -1913,6 +1918,7 @@ release.new_release=Nueva Release
19131918
release.draft=Borrador
19141919
release.prerelease=Pre-lanzamiento
19151920
release.stable=Estable
1921+
release.compare=Comparar
19161922
release.edit=editar
19171923
release.ahead.commits=<strong>%d</strong> commits
19181924
release.ahead.target=a %s desde esta versión
@@ -2130,7 +2136,7 @@ dashboard.cron.error=Error en Cron: %s: %[3]s
21302136
dashboard.cron.finished=Cron: %[1]s ha finalizado
21312137
dashboard.delete_inactive_accounts=Eliminar todas las cuentas inactivas
21322138
dashboard.delete_inactive_accounts.started=Se ha iniciado la tarea: "Eliminar todas las cuentas inactivas".
2133-
dashboard.delete_repo_archives=Borrar todos los archivos del repositorio (ZIP, TAR.GZ, etc.)
2139+
dashboard.delete_repo_archives=Eliminar todos los archivos del repositorio (ZIP, TAR.GZ, etc.)
21342140
dashboard.delete_repo_archives.started=Se ha iniciado la tarea: "Eliminar todos los archivos del repositorios".
21352141
dashboard.delete_missing_repos=Eliminar todos los repositorios que faltan sus archivos Git
21362142
dashboard.delete_missing_repos.started=Se ha iniciado la tarea: "Eliminar todos los repositorios que faltan sus archivos Git".
@@ -2179,6 +2185,8 @@ dashboard.total_gc_time=Pausa Total por GC
21792185
dashboard.total_gc_pause=Pausa Total por GC
21802186
dashboard.last_gc_pause=Última Pausa por GC
21812187
dashboard.gc_times=Ejecuciones GC
2188+
dashboard.delete_old_actions=Eliminar todas las acciones antiguas de la base de datos
2189+
dashboard.delete_old_actions.started=Eliminar todas las acciones antiguas de la base de datos inicializada.
21822190

21832191
users.user_manage_panel=Gestión de cuentas de usuario
21842192
users.new_account=Crear Cuenta de Usuario
@@ -2305,6 +2313,7 @@ auths.allowed_domains_helper=Dejar vacío para permitir todos los dominios. Sepa
23052313
auths.enable_tls=Habilitar cifrado TLS
23062314
auths.skip_tls_verify=Omitir la verificación TLS
23072315
auths.pam_service_name=Nombre del Servicio PAM
2316+
auths.pam_email_domain=Dominio de correo de PAM (opcional)
23082317
auths.oauth2_provider=Proveedor OAuth2
23092318
auths.oauth2_icon_url=URL de icono
23102319
auths.oauth2_clientID=ID de cliente (clave)
@@ -2404,6 +2413,7 @@ config.db_path=Ruta
24042413
config.service_config=Configuración del servicio
24052414
config.register_email_confirm=Requerir confirmación de correo electrónico para registrarse
24062415
config.disable_register=Deshabilitar auto-registro
2416+
config.allow_only_internal_registration=Permitir el registro solo desde Gitea
24072417
config.allow_only_external_registration=Permitir el registro únicamente a través de servicios externos
24082418
config.enable_openid_signup=Habilitar el auto-registro con OpenID
24092419
config.enable_openid_signin=Habilitar el inicio de sesión con OpenID

0 commit comments

Comments
 (0)