Skip to content

Commit

Permalink
修复格式错误 (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
KomachiSion authored Oct 25, 2023
1 parent 93bafa0 commit 0db8caa
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 38 deletions.
2 changes: 1 addition & 1 deletion blog/zh-cn/2.3.0-beta-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Nacos在2023年度的[编程夏令营](https://www.gitlink.org.cn/glcc/2023/proj

由于导师和同学的努力,Nacos社区荣获CCF Gitlink 颁发的开源编程夏令营的优秀社区奖,感谢主办方Gitlink为社区提供的平台和活动。

|![奖杯](https://cdn.nlark.com/yuque/0/2023/jpeg/1577777/1698197262198-f88bab75-a8f8-41f8-9675-9bfa916642c7.jpeg#averageHue=%23786456&clientId=ueeb4d907-433f-4&from=drop&id=udede56df&originHeight=3024&originWidth=4032&originalType=binary&ratio=2&rotation=0&showTitle=false&size=877771&status=done&style=none&taskId=u6da77a56-e076-4a34-ae9b-c1e8afb010b&title=)|![现场](https://cdn.nlark.com/yuque/0/2023/jpeg/1577777/1698197100242-e440717c-80ec-4825-93c1-2daca1f289c4.jpeg#averageHue=%236664b2&clientId=u14301240-344a-4&from=drop&id=ua9e02282&originHeight=854&originWidth=1280&originalType=binary&ratio=2&rotation=0&showTitle=false&size=204483&status=done&style=none&taskId=u7637d2eb-a17e-431e-a637-231a61f9e96&title=)|
|![奖杯](https://cdn.nlark.com/yuque/0/2023/jpeg/1577777/1698205859719-a59c31cf-153a-45dc-a9c5-e8859fc94a77.jpeg)|![现场](https://cdn.nlark.com/yuque/0/2023/jpeg/1577777/1698197100242-e440717c-80ec-4825-93c1-2daca1f289c4.jpeg#averageHue=%236664b2&clientId=u14301240-344a-4&from=drop&id=ua9e02282&originHeight=854&originWidth=1280&originalType=binary&ratio=2&rotation=0&showTitle=false&size=204483&status=done&style=none&taskId=u7637d2eb-a17e-431e-a637-231a61f9e96&title=)|
|----|----|

## 展望
Expand Down
34 changes: 17 additions & 17 deletions docs/zh-cn/v2/guide/user/parameters-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ date: 2023-10-24

2.3.0版本之前的Nacos的参数校验逻辑分散,由各类请求的处理方法单独进行校验,难以更改维护,经常出现参数校验的遗漏,参数校验的规则也没有明确统一;这使得用户使用时经常会因为一些特殊字符导致功能不符合预期或出现漏洞,甚至导致大量推送,导致带宽打满,内存占用过多,导致应用出现故障。

在2.3.0版本中,Nacos明确了参数#### 校验规则,在服务端实现了统一的参数校验逻辑并添加了参数校验层,根据#### 校验规则对客户端向服务端发送的请求进行校验
在2.3.0版本中,Nacos明确了参数校验规则,在服务端实现了统一的参数校验逻辑并添加了参数校验层,根据校验规则对客户端向服务端发送的请求进行校验

用户可以选择开启参数校验功能,开启后Nacos将会对客户端向服务端发送的请求中的部分参数进行参数校验,确保参数的合法性,避免由于错误使用,导致的不符合预期以及性能问题。

Expand All @@ -27,9 +27,9 @@ date: 2023-10-24

## 参数校验规则

开启参数校验后OpenAPI文档 和 SDK文档中的所有接口中的相关参数都会接受格式校验,现对相关参数以及#### 校验规则进行说明
开启参数校验后OpenAPI文档 和 SDK文档中的所有接口中的相关参数都会接受格式校验,现对相关参数以及校验规则进行说明

|参数描述|最大字符长度|#### 校验规则|
|参数描述|最大字符长度|校验规则|
|-----|-----|-----|
|命名空间名称|256|禁止`@#$%^&*`,对应正则表达式:`[^@#$%^&*]+$`|
|命名空间ID|64|只允许字母数字下划线以及"-"字符,对应正则表达式:`^[\w-]+`
Expand Down Expand Up @@ -57,8 +57,8 @@ date: 2023-10-24

#### 校验失败报错信息

-超出长度:`Param 'namespaceShowName' is illegal, the param length should not exceed 256.`
-非法字符:`Param 'namespaceShowName' is illegal, illegal characters should not appear in the param.`
- 超出长度:`Param 'namespaceShowName' is illegal, the param length should not exceed 256.`
- 非法字符:`Param 'namespaceShowName' is illegal, illegal characters should not appear in the param.`

### 2. namespaceId/tenant/namespace

Expand All @@ -77,8 +77,8 @@ date: 2023-10-24

#### 校验失败报错信息

-超出长度:`Param 'namespaceId/tenant' is illegal, the param length should not exceed 64.`
-非法字符:`Param 'namespaceId/tenant' is illegal, illegal characters should not appear in the param.`
- 超出长度:`Param 'namespaceId/tenant' is illegal, the param length should not exceed 64.`
- 非法字符:`Param 'namespaceId/tenant' is illegal, illegal characters should not appear in the param.`

### 3. dataId

Expand All @@ -100,8 +100,8 @@ date: 2023-10-24

#### 校验失败报错信息

-超出长度:`Param 'dataId' is illegal, the param length should not exceed 512.`
-非法字符:`Param 'dataId' is illegal, illegal characters should not appear in the param.`
- 超出长度:`Param 'dataId' is illegal, the param length should not exceed 512.`
- 非法字符:`Param 'dataId' is illegal, illegal characters should not appear in the param.`

### 4. service/serviceName

Expand All @@ -123,8 +123,8 @@ date: 2023-10-24

#### 校验失败报错信息

-超出长度:`Param 'serviceName' is illegal, the param length should not exceed 512.`
-非法字符:`Param 'serviceName' is illegal, illegal characters should not appear in the param.`
- 超出长度:`Param 'serviceName' is illegal, the param length should not exceed 512.`
- 非法字符:`Param 'serviceName' is illegal, illegal characters should not appear in the param.`

### 5. group/groupName

Expand All @@ -146,8 +146,8 @@ date: 2023-10-24

#### 校验失败报错信息

-超出长度:`Param 'group' is illegal, the param length should not exceed 512.`
-非法字符:`Param 'group' is illegal, illegal characters should not appear in the param.`
- 超出长度:`Param 'group' is illegal, the param length should not exceed 512.`
- 非法字符:`Param 'group' is illegal, illegal characters should not appear in the param.`

### 6. cluster/clusterName

Expand All @@ -169,8 +169,8 @@ date: 2023-10-24

#### 校验失败报错信息

-超出长度:`Param 'cluster' is illegal, the param length should not exceed 64.`
-非法字符:`Param 'cluster' is illegal, illegal characters should not appear in the param.`
- 超出长度:`Param 'cluster' is illegal, the param length should not exceed 64.`
- 非法字符:`Param 'cluster' is illegal, illegal characters should not appear in the param.`

### 7. ip

Expand All @@ -192,8 +192,8 @@ IP地址

#### 校验失败报错信息

-超出长度:`Param 'ip' is illegal, the param length should not exceed 128.`
-非法字符:`Param 'ip' is illegal, illegal characters should not appear in the param.`
- 超出长度:`Param 'ip' is illegal, the param length should not exceed 128.`
- 非法字符:`Param 'ip' is illegal, illegal characters should not appear in the param.`

### 8. port

Expand Down
2 changes: 1 addition & 1 deletion zh-cn/blog/2.3.0-beta-release.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ <h3>Nacos 荣获编程夏令营 GLCC 2023优秀社区</h3>
<table>
<thead>
<tr>
<th><img src="https://cdn.nlark.com/yuque/0/2023/jpeg/1577777/1698197262198-f88bab75-a8f8-41f8-9675-9bfa916642c7.jpeg#averageHue=%23786456&amp;clientId=ueeb4d907-433f-4&amp;from=drop&amp;id=udede56df&amp;originHeight=3024&amp;originWidth=4032&amp;originalType=binary&amp;ratio=2&amp;rotation=0&amp;showTitle=false&amp;size=877771&amp;status=done&amp;style=none&amp;taskId=u6da77a56-e076-4a34-ae9b-c1e8afb010b&amp;title=" alt="奖杯"></th>
<th><img src="https://cdn.nlark.com/yuque/0/2023/jpeg/1577777/1698205859719-a59c31cf-153a-45dc-a9c5-e8859fc94a77.jpeg" alt="奖杯"></th>
<th><img src="https://cdn.nlark.com/yuque/0/2023/jpeg/1577777/1698197100242-e440717c-80ec-4825-93c1-2daca1f289c4.jpeg#averageHue=%236664b2&amp;clientId=u14301240-344a-4&amp;from=drop&amp;id=ua9e02282&amp;originHeight=854&amp;originWidth=1280&amp;originalType=binary&amp;ratio=2&amp;rotation=0&amp;showTitle=false&amp;size=204483&amp;status=done&amp;style=none&amp;taskId=u7637d2eb-a17e-431e-a637-231a61f9e96&amp;title=" alt="现场"></th>
</tr>
</thead>
Expand Down
Loading

0 comments on commit 0db8caa

Please sign in to comment.