mirror of
https://github.com/go-gitea/gitea
synced 2024-07-27 17:17:08 +02:00
Compare commits
7 Commits
f59dbdb4f8
...
063f9b7cc0
Author | SHA1 | Date | |
---|---|---|---|
|
063f9b7cc0 | ||
|
a40192dc12 | ||
|
e1cf760d2f | ||
|
4535317f0e | ||
|
9d7e842336 | ||
|
5b94889774 | ||
|
c24cd927b8 |
|
@ -2981,6 +2981,10 @@ emails.not_updated=Falhou a modificação do endereço de email solicitado: %v
|
|||
emails.duplicate_active=Este endereço de email já está a ser usado por outro utilizador.
|
||||
emails.change_email_header=Modificar propriedades do email
|
||||
emails.change_email_text=Tem a certeza que quer modificar este endereço de email?
|
||||
emails.delete=Eliminar email
|
||||
emails.delete_desc=Tem a certeza que quer eliminar este endereço de email?
|
||||
emails.deletion_success=O endereço de email foi eliminado.
|
||||
emails.delete_primary_email_error=NĂŁo pode eliminar o email principal.
|
||||
|
||||
orgs.org_manage_panel=Gestão das organizações
|
||||
orgs.name=Nome
|
||||
|
|
|
@ -327,7 +327,7 @@ func getOAuthGroupsForUser(ctx go_context.Context, user *user_model.User) ([]str
|
|||
|
||||
func parseBasicAuth(ctx *context.Context) (username, password string, err error) {
|
||||
authHeader := ctx.Req.Header.Get("Authorization")
|
||||
if authType, authData, ok := strings.Cut(authHeader, " "); ok && authType == "Basic" {
|
||||
if authType, authData, ok := strings.Cut(authHeader, " "); ok && strings.EqualFold(authType, "Basic") {
|
||||
return base.BasicAuthDecode(authData)
|
||||
}
|
||||
return "", "", errors.New("invalid basic authentication")
|
||||
|
@ -661,7 +661,7 @@ func AccessTokenOAuth(ctx *context.Context) {
|
|||
// if there is no ClientID or ClientSecret in the request body, fill these fields by the Authorization header and ensure the provided field matches the Authorization header
|
||||
if form.ClientID == "" || form.ClientSecret == "" {
|
||||
authHeader := ctx.Req.Header.Get("Authorization")
|
||||
if authType, authData, ok := strings.Cut(authHeader, " "); ok && authType == "Basic" {
|
||||
if authType, authData, ok := strings.Cut(authHeader, " "); ok && strings.EqualFold(authType, "Basic") {
|
||||
clientID, clientSecret, err := base.BasicAuthDecode(authData)
|
||||
if err != nil {
|
||||
handleAccessTokenError(ctx, AccessTokenError{
|
||||
|
|
|
@ -14,20 +14,22 @@
|
|||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
|
||||
<label for="user_name">{{ctx.Locale.Tr "home.uname_holder"}}</label>
|
||||
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
|
||||
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required tabindex="1">
|
||||
</div>
|
||||
{{if or (not .DisablePassword) .LinkAccountMode}}
|
||||
<div class="required field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}} form-field-content-aside-label">
|
||||
<label for="password">{{ctx.Locale.Tr "password"}}</label>
|
||||
<a href="{{AppSubUrl}}/user/forgot_password">{{ctx.Locale.Tr "auth.forgot_password"}}</a>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="current-password" required>
|
||||
<div>
|
||||
<a href="{{AppSubUrl}}/user/forgot_password" tabindex="4">{{ctx.Locale.Tr "auth.forgot_password"}}</a>
|
||||
</div>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="current-password" required tabindex="2">
|
||||
</div>
|
||||
{{end}}
|
||||
{{if not .LinkAccountMode}}
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label>{{ctx.Locale.Tr "auth.remember_me"}}</label>
|
||||
<input name="remember" type="checkbox">
|
||||
<input name="remember" type="checkbox" tabindex="5">
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
@ -35,7 +37,7 @@
|
|||
{{template "user/auth/captcha" .}}
|
||||
|
||||
<div class="field">
|
||||
<button class="ui primary button tw-w-full">
|
||||
<button class="ui primary button tw-w-full" tabindex="3">
|
||||
{{if .LinkAccountMode}}
|
||||
{{ctx.Locale.Tr "auth.oauth_signin_submit"}}
|
||||
{{else}}
|
||||
|
|
|
@ -456,7 +456,6 @@ textarea:focus,
|
|||
}
|
||||
.form-field-content-aside-label > *:nth-child(2) {
|
||||
text-align: right;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.form-field-content-aside-label input {
|
||||
grid-column: span 2;
|
||||
|
|
Loading…
Reference in New Issue
Block a user