Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/go-gitea/gitea into feature…
Browse files Browse the repository at this point in the history
…-svg-diff
  • Loading branch information
KN4CK3R committed May 21, 2021
2 parents 758b477 + d6d2444 commit 109b345
Show file tree
Hide file tree
Showing 25 changed files with 145 additions and 143 deletions.
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ steps:
pull: always
image: techknowlogick/xgo:go-1.16.x
commands:
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt-get install -y nodejs
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
- export PATH=$PATH:$GOPATH/bin
- make release
environment:
Expand Down Expand Up @@ -599,7 +599,7 @@ steps:
pull: always
image: techknowlogick/xgo:go-1.16.x
commands:
- curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt-get install -y nodejs
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
- export PATH=$PATH:$GOPATH/bin
- make release
environment:
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.rootless
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ RUN apk --no-cache add \
ca-certificates \
gettext \
git \
curl \
gnupg

RUN addgroup \
Expand Down
6 changes: 3 additions & 3 deletions docs/content/doc/developers/hacking-on-gitea.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ See `make help` for all available `make` targets. Also see [`.drone.yml`](https:

## Building continuously

To run and continously rebuild when source files change:
To run and continuously rebuild when source files change:

```bash
make watch
Expand Down Expand Up @@ -216,7 +216,7 @@ You should validate your generated Swagger file and spell-check it with:
make swagger-validate misspell-check
```

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

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

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

Expand Down
4 changes: 2 additions & 2 deletions docs/content/doc/features/authentication.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ Adds the following fields:
- Bind Password (optional)

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

- User Search Base **(required)**

Expand Down
17 changes: 16 additions & 1 deletion models/login_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"code.gitea.io/gitea/modules/auth/oauth2"
"code.gitea.io/gitea/modules/auth/pam"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/secret"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/util"
Expand Down Expand Up @@ -77,11 +78,25 @@ type LDAPConfig struct {
// FromDB fills up a LDAPConfig from serialized format.
func (cfg *LDAPConfig) FromDB(bs []byte) error {
json := jsoniter.ConfigCompatibleWithStandardLibrary
return json.Unmarshal(bs, &cfg)
err := json.Unmarshal(bs, &cfg)
if err != nil {
return err
}
if cfg.BindPasswordEncrypt != "" {
cfg.BindPassword, err = secret.DecryptSecret(setting.SecretKey, cfg.BindPasswordEncrypt)
cfg.BindPasswordEncrypt = ""
}
return err
}

// ToDB exports a LDAPConfig to a serialized format.
func (cfg *LDAPConfig) ToDB() ([]byte, error) {
var err error
cfg.BindPasswordEncrypt, err = secret.EncryptSecret(setting.SecretKey, cfg.BindPassword)
if err != nil {
return nil, err
}
cfg.BindPassword = ""
json := jsoniter.ConfigCompatibleWithStandardLibrary
return json.Marshal(cfg)
}
Expand Down
1 change: 1 addition & 0 deletions modules/auth/ldap/ldap.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type Source struct {
SecurityProtocol SecurityProtocol
SkipVerify bool
BindDN string // DN to bind with
BindPasswordEncrypt string // Encrypted Bind BN password
BindPassword string // Bind DN password
UserBase string // Base search path for users
UserDN string // Template for the DN of the user for simple auth
Expand Down
1 change: 0 additions & 1 deletion options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2283,7 +2283,6 @@ auths.host = Host
auths.port = Port
auths.bind_dn = Bind DN
auths.bind_password = Bind Password
auths.bind_password_helper = Warning: This password is stored in plain text. Use a read-only account if possible.
auths.user_base = User Search Base
auths.user_dn = User DN
auths.attribute_username = Username Attribute
Expand Down
14 changes: 12 additions & 2 deletions options/locale/locale_es-ES.ini
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ branch=Rama
tree=Árbol
clear_ref=`Borrar referencia actual`
filter_branch_and_tag=Filtrar por rama o etiqueta
find_tag=Buscar etiqueta
branches=Ramas
tags=Etiquetas
issues=Incidencias
Expand Down Expand Up @@ -1158,7 +1159,7 @@ issues.label_color=Color etiqueta
issues.label_count=%d etiquetas
issues.label_open_issues=%d incidencias abiertas
issues.label_edit=Editar
issues.label_delete=Borrar
issues.label_delete=Eliminar
issues.label_modify=Editar etiqueta
issues.label_deletion=Eliminar etiqueta
issues.label_deletion_desc=Eliminar una etiqueta la elimina de todos las incidencias. ¿Continuar?
Expand Down Expand Up @@ -1284,6 +1285,8 @@ issues.review.resolved_by=ha marcado esta conversación como resuelta
issues.assignee.error=No todos los asignados fueron añadidos debido a un error inesperado.
issues.reference_issue.body=Cuerpo

compare.compare_base=base
compare.compare_head=comparar

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

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

0 comments on commit 109b345

Please sign in to comment.