Skip to content

Commit f242f71

Browse files
fix: Add length limit to comments (#8055)
1 parent 660dc62 commit f242f71

File tree

13 files changed

+48
-15
lines changed

13 files changed

+48
-15
lines changed

agent/app/dto/request/website.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
type WebsiteSearch struct {
88
dto.PageInfo
99
Name string `json:"name"`
10-
OrderBy string `json:"orderBy" validate:"required,oneof=primary_domain type status createdAt expire_date"`
10+
OrderBy string `json:"orderBy" validate:"required,oneof=primary_domain type status createdAt expire_date created_at"`
1111
Order string `json:"order" validate:"required,oneof=null ascending descending"`
1212
WebsiteGroupID uint `json:"websiteGroupId"`
1313
}

agent/app/repo/website.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package repo
22

33
import (
44
"context"
5-
65
"github.com/1Panel-dev/1Panel/agent/app/model"
76
"github.com/1Panel-dev/1Panel/agent/global"
87
"gorm.io/gorm"

agent/app/service/website_ssl.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func (w WebsiteSSLService) Create(create request.WebsiteSSLCreate) (request.Webs
138138
if create.PushDir {
139139
fileOP := files.NewFileOp()
140140
if !fileOP.Stat(create.Dir) {
141-
_ = fileOP.CreateDir(create.Dir, constant.DirPerm)
141+
return res, buserr.New("ErrLinkPathNotFound")
142142
}
143143
websiteSSL.Dir = create.Dir
144144
}
@@ -490,7 +490,7 @@ func (w WebsiteSSLService) Update(update request.WebsiteSSLUpdate) error {
490490
updateParams["shell"] = ""
491491
}
492492

493-
if websiteSSL.Provider != constant.SelfSigned {
493+
if websiteSSL.Provider != constant.SelfSigned && websiteSSL.Provider != constant.Manual {
494494
acmeAccount, err := websiteAcmeRepo.GetFirst(repo.WithByID(update.AcmeAccountID))
495495
if err != nil {
496496
return err

frontend/src/lang/modules/en.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ const message = {
247247
phpExtension: 'Only supports , _ lowercase English and numbers',
248248
paramHttp: 'Must start with http:// or https://',
249249
phone: 'The format of the phone number is incorrect',
250+
authBasicPassword: 'Supports letters, numbers, and common special characters, length 1-72',
251+
length128Err: 'Length cannot exceed 128 characters',
250252
},
251253
res: {
252254
paramError: 'The request failed, please try again later!',

frontend/src/lang/modules/ja.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ const message = {
240240
phpExtension: '_小文字の英語と数字のみをサポートします',
241241
paramHttp: 'http://またはhttps://で始める必要があります',
242242
phone: '電話番号の形式は正しくありません',
243+
authBasicPassword: '英字、数字、一般的な特殊文字をサポート、長さ1-72',
244+
length128Err: '長さは128文字を超えることはできません',
243245
},
244246
res: {
245247
paramError: 'リクエストが失敗しました。後でもう一度やり直してください!',

frontend/src/lang/modules/ko.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ const message = {
241241
phpExtension: '소문자 영어와 숫자, "_"만 지원합니다',
242242
paramHttp: 'http:// 또는 https:// 로 시작해야 합니다',
243243
phone: '전화번호 형식이 올바르지 않습니다',
244+
authBasicPassword: '알파벳, 숫자 및 일반 특수 문자 지원, 길이 1-72',
245+
length128Err: '길이는 128자를 초과할 수 없습니다',
244246
},
245247
res: {
246248
paramError: '요청이 실패했습니다. 나중에 다시 시도하세요!',

frontend/src/lang/modules/ms.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ const message = {
247247
phpExtension: 'Hanya menyokong huruf kecil, _, dan nombor',
248248
paramHttp: 'Mesti bermula dengan http:// atau https://',
249249
phone: 'Format nombor telefon tidak betul.',
250+
authBasicPassword: 'Menyokong huruf, nombor, dan aksara khas biasa, panjang 1-72',
251+
length128Err: 'Panjang tidak boleh melebihi 128 aksara',
250252
},
251253
res: {
252254
paramError: 'Permintaan gagal, sila cuba lagi nanti!',

frontend/src/lang/modules/pt-br.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ const message = {
245245
phpExtension: 'Suporta apenas _, letras minúsculas e números',
246246
paramHttp: 'Deve começar com http:// ou https://',
247247
phone: 'O formato do número de telefone está incorreto',
248+
authBasicPassword: 'Suporta letras, números e caracteres especiais comuns, comprimento 1-72',
249+
length128Err: 'O comprimento não pode exceder 128 caracteres',
248250
},
249251
res: {
250252
paramError: 'A solicitação falhou, por favor, tente novamente mais tarde!',

frontend/src/lang/modules/ru.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ const message = {
241241
phpExtension: 'Поддерживаются только запятые, подчеркивания, строчные английские буквы и цифры',
242242
paramHttp: 'Должно начинаться с http:// или https://',
243243
phone: 'Неверный формат номера телефона',
244+
authBasicPassword: 'Поддерживает буквы, цифры и общие специальные символы, длина 1-72',
245+
length128Err: 'Длина не может превышать 128 символов',
244246
},
245247
res: {
246248
paramError: 'Запрос не удался, попробуйте позже!',

frontend/src/lang/modules/zh-Hant.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ const message = {
240240
phpExtension: '僅支持 , _ 小寫英文和數字',
241241
paramHttp: '必須以 http:// 或 https:// 開頭',
242242
phone: '手機號碼格式不正確',
243+
authBasicPassword: '支持字母、數字以及常見特殊字符,長度1-72',
244+
length128Err: '長度不能超過128位',
243245
},
244246
res: {
245247
paramError: '請求失敗,請稍後重試!',

0 commit comments

Comments
 (0)