mirror of
https://github.com/go-gitea/gitea
synced 2024-07-27 17:17:08 +02:00
Compare commits
4 Commits
bf083be238
...
74e1691bc9
Author | SHA1 | Date | |
---|---|---|---|
|
74e1691bc9 | ||
|
a40192dc12 | ||
|
e1cf760d2f | ||
|
7381a313dd |
|
@ -568,7 +568,7 @@ rules:
|
|||
no-jquery/no-param: [2]
|
||||
no-jquery/no-parent: [0]
|
||||
no-jquery/no-parents: [2]
|
||||
no-jquery/no-parse-html-literal: [0]
|
||||
no-jquery/no-parse-html-literal: [2]
|
||||
no-jquery/no-parse-html: [2]
|
||||
no-jquery/no-parse-json: [2]
|
||||
no-jquery/no-parse-xml: [2]
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import $ from 'jquery';
|
||||
import {htmlEscape} from 'escape-goat';
|
||||
import {createCodeEditor} from './codeeditor.ts';
|
||||
import {hideElem, queryElems, showElem} from '../utils/dom.ts';
|
||||
import {hideElem, queryElems, showElem, createElementFromHTML} from '../utils/dom.ts';
|
||||
import {initMarkupContent} from '../markup/content.ts';
|
||||
import {attachRefIssueContextPopup} from './contextpopup.ts';
|
||||
import {POST} from '../modules/fetch.ts';
|
||||
|
@ -61,7 +61,7 @@ export function initRepoEditor() {
|
|||
});
|
||||
}
|
||||
|
||||
const filenameInput = document.querySelector('#file-name');
|
||||
const filenameInput = document.querySelector<HTMLInputElement>('#file-name');
|
||||
function joinTreePath() {
|
||||
const parts = [];
|
||||
for (const el of document.querySelectorAll('.breadcrumb span.section')) {
|
||||
|
@ -80,8 +80,12 @@ export function initRepoEditor() {
|
|||
const value = parts[i];
|
||||
if (i < parts.length - 1) {
|
||||
if (value.length) {
|
||||
$(`<span class="section"><a href="#">${htmlEscape(value)}</a></span>`).insertBefore($(filenameInput));
|
||||
$('<div class="breadcrumb-divider">/</div>').insertBefore($(filenameInput));
|
||||
filenameInput.before(createElementFromHTML(
|
||||
`<span class="section"><a href="#">${htmlEscape(value)}</a></span>`,
|
||||
));
|
||||
filenameInput.before(createElementFromHTML(
|
||||
`<div class="breadcrumb-divider">/</div>`,
|
||||
));
|
||||
}
|
||||
} else {
|
||||
filenameInput.value = value;
|
||||
|
|
Loading…
Reference in New Issue
Block a user