Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix destination not encoded #4279

Merged
merged 1 commit into from
Aug 11, 2022
Merged

fix destination not encoded #4279

merged 1 commit into from
Aug 11, 2022

Conversation

tianpeidong
Copy link
Contributor

@tianpeidong tianpeidong commented Jul 4, 2022

bug fix #4276 canal instance 名称不能带有空格,带空格会导致canal-server 获取instance.properties 报错 ,无法启动canal instance

问题复现:

创建instance "test inst"
启动instance
查看canal server 日志

image

经确认为获取instance.properties 时未对canal instance 名称做url encode 导致

程序位置:
类 PlainCanalConfigClient
方法 public PlainCanal findInstance(String destination, String md5)
程序 String url = configURL + "/api/v1/config/instance_polling/" + destination + "?md5=" + md5;
image

解决:
对destination 做encode

String url = configURL + "/api/v1/config/instance_polling/" + UrlEscapers.urlPathSegmentEscaper().escape(destination) + "?md5=" + md5;

@tianpeidong
Copy link
Contributor Author

tianpeidong commented Jul 19, 2022

是不是引入com.google.common.net.UrlEscapers 不太好哦
可以给一下意见吗

@agapple agapple merged commit 4d4199c into alibaba:master Aug 11, 2022
@agapple
Copy link
Member

agapple commented Aug 11, 2022

tks

rewerma added a commit that referenced this pull request Dec 6, 2022
* optimize YAML config loader (#4332)

* fix bug BASE TABLE as table name (#4217)

* fix issues#4328 (#4329)

* docs: add nodejs canal client support (#4260)

Co-authored-by: zhangxunwei <[email protected]>

* fix destination not encoded (#4279)

* 修复Canal指定时间戳启动失效,总是从最新的点位开始同步问题 (#4348)

* 支持用户自定义的CanalAlarmHandler

* RowsLogEvent增加对TableMapLogEvent判空检查,防止NPE异常

* 修复Canal指定时间戳启动失效,总是从最新的点位开始同步问题, issue: #4347

Co-authored-by: 云时 <[email protected]>

* fixed 4334 , support jdk8/jdk11

* fixed issue #4266 , typo

* fixed issue #4243 , support auto register for cluster = null

* fixed issue #4225 , support mysql version >= 8.0.26 heartbeat v2

* fixed issue #4308 , support query_log_event for maraiadb 10.10.1

* ignore compression event

* support jdk11

* support druid 1.2.12

* fixed mariadb 10.x

* sync canal-template.properties

* update fastjson & druid version (#4406)

* 修复升级2.0.4导致兼容的问题

* update druid & fastjson version

* update fastjson version

* update druid & fastjson version

* meta.dat文件数据丢失 (#4397)

* update fastjson & druid version (#4438)

* 局部变量线程安全,优先使用StringBuilder替换StringBuffer (#4472)

Co-authored-by: 夏亮 <[email protected]>

* 1. CanalController stop 需要同时将 embededCanalServer.stop (#4477)

2. ServerRunningMonitor 线程池未正常回收,线程池管理与 start/stop保持一致

* vuln-fix: Use HTTPS instead of HTTP to resolve dependencies (#4437)

This fixes a security vulnerability in this project where the `build.gradle`
files were configuring Gradle to resolve dependencies over HTTP instead of
HTTPS.

Weakness: CWE-829: Inclusion of Functionality from Untrusted Control Sphere
Severity: High
CVSSS: 8.1
Detection: OpenRewrite

Reported-by: Jonathan Leitschuh <[email protected]>
Signed-off-by: Jonathan Leitschuh <[email protected]>

Bug-tracker: JLLeitschuh/security-research#9


Co-authored-by: Moderne <[email protected]>

Co-authored-by: Moderne <[email protected]>

* fix_ETL同步mysql关键字报错 (#4346)

Co-authored-by: foleyang <[email protected]>

* optimize code

* use compact BigDecimal

* performance optimize , 1. cache string names 2. cache Charset

* performance optimize ,cache integer/long valueof

* 测试类报错

Co-authored-by: gongchangyou <[email protected]>
Co-authored-by: ChanaLii <[email protected]>
Co-authored-by: zhangxunwei <[email protected]>
Co-authored-by: zhangxunwei <[email protected]>
Co-authored-by: tianpeidong <[email protected]>
Co-authored-by: dataccs <[email protected]>
Co-authored-by: 云时 <[email protected]>
Co-authored-by: jianghang.loujh <[email protected]>
Co-authored-by: 温绍锦 <[email protected]>
Co-authored-by: noaso <[email protected]>
Co-authored-by: HumanPassenger <[email protected]>
Co-authored-by: 夏亮 <[email protected]>
Co-authored-by: 华仔 <[email protected]>
Co-authored-by: Jonathan Leitschuh <[email protected]>
Co-authored-by: Moderne <[email protected]>
Co-authored-by: 杰锅不是锅 <[email protected]>
Co-authored-by: foleyang <[email protected]>
rewerma added a commit that referenced this pull request Dec 6, 2022
* 修复测试类报错 (#4516)

* optimize YAML config loader (#4332)

* fix bug BASE TABLE as table name (#4217)

* fix issues#4328 (#4329)

* docs: add nodejs canal client support (#4260)

Co-authored-by: zhangxunwei <[email protected]>

* fix destination not encoded (#4279)

* 修复Canal指定时间戳启动失效,总是从最新的点位开始同步问题 (#4348)

* 支持用户自定义的CanalAlarmHandler

* RowsLogEvent增加对TableMapLogEvent判空检查,防止NPE异常

* 修复Canal指定时间戳启动失效,总是从最新的点位开始同步问题, issue: #4347

Co-authored-by: 云时 <[email protected]>

* fixed 4334 , support jdk8/jdk11

* fixed issue #4266 , typo

* fixed issue #4243 , support auto register for cluster = null

* fixed issue #4225 , support mysql version >= 8.0.26 heartbeat v2

* fixed issue #4308 , support query_log_event for maraiadb 10.10.1

* ignore compression event

* support jdk11

* support druid 1.2.12

* fixed mariadb 10.x

* sync canal-template.properties

* update fastjson & druid version (#4406)

* 修复升级2.0.4导致兼容的问题

* update druid & fastjson version

* update fastjson version

* update druid & fastjson version

* meta.dat文件数据丢失 (#4397)

* update fastjson & druid version (#4438)

* 局部变量线程安全,优先使用StringBuilder替换StringBuffer (#4472)

Co-authored-by: 夏亮 <[email protected]>

* 1. CanalController stop 需要同时将 embededCanalServer.stop (#4477)

2. ServerRunningMonitor 线程池未正常回收,线程池管理与 start/stop保持一致

* vuln-fix: Use HTTPS instead of HTTP to resolve dependencies (#4437)

This fixes a security vulnerability in this project where the `build.gradle`
files were configuring Gradle to resolve dependencies over HTTP instead of
HTTPS.

Weakness: CWE-829: Inclusion of Functionality from Untrusted Control Sphere
Severity: High
CVSSS: 8.1
Detection: OpenRewrite

Reported-by: Jonathan Leitschuh <[email protected]>
Signed-off-by: Jonathan Leitschuh <[email protected]>

Bug-tracker: JLLeitschuh/security-research#9


Co-authored-by: Moderne <[email protected]>

Co-authored-by: Moderne <[email protected]>

* fix_ETL同步mysql关键字报错 (#4346)

Co-authored-by: foleyang <[email protected]>

* optimize code

* use compact BigDecimal

* performance optimize , 1. cache string names 2. cache Charset

* performance optimize ,cache integer/long valueof

* 测试类报错

Co-authored-by: gongchangyou <[email protected]>
Co-authored-by: ChanaLii <[email protected]>
Co-authored-by: zhangxunwei <[email protected]>
Co-authored-by: zhangxunwei <[email protected]>
Co-authored-by: tianpeidong <[email protected]>
Co-authored-by: dataccs <[email protected]>
Co-authored-by: 云时 <[email protected]>
Co-authored-by: jianghang.loujh <[email protected]>
Co-authored-by: 温绍锦 <[email protected]>
Co-authored-by: noaso <[email protected]>
Co-authored-by: HumanPassenger <[email protected]>
Co-authored-by: 夏亮 <[email protected]>
Co-authored-by: 华仔 <[email protected]>
Co-authored-by: Jonathan Leitschuh <[email protected]>
Co-authored-by: Moderne <[email protected]>
Co-authored-by: 杰锅不是锅 <[email protected]>
Co-authored-by: foleyang <[email protected]>

* Revert "修复测试类报错 (#4516)"

This reverts commit d899981.

Co-authored-by: gongchangyou <[email protected]>
Co-authored-by: ChanaLii <[email protected]>
Co-authored-by: zhangxunwei <[email protected]>
Co-authored-by: zhangxunwei <[email protected]>
Co-authored-by: tianpeidong <[email protected]>
Co-authored-by: dataccs <[email protected]>
Co-authored-by: 云时 <[email protected]>
Co-authored-by: jianghang.loujh <[email protected]>
Co-authored-by: 温绍锦 <[email protected]>
Co-authored-by: noaso <[email protected]>
Co-authored-by: HumanPassenger <[email protected]>
Co-authored-by: 夏亮 <[email protected]>
Co-authored-by: 华仔 <[email protected]>
Co-authored-by: Jonathan Leitschuh <[email protected]>
Co-authored-by: Moderne <[email protected]>
Co-authored-by: 杰锅不是锅 <[email protected]>
Co-authored-by: foleyang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

canal instance 名不能带空格
2 participants