happyfish100 / happyfish100/fastdfs-client-java
TrackerClient.listStorages协议传参最大长度和服务端不太符合
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 891
- PR merge metrics
- No merged PRs in 30d
Description
TrackerClient.listStorages 第三个参数storageIpAddr,似乎在tracker服务端是指storageId。不支持ipv6之前 id的最大长度和ip最大长度一致,所以没有问题,支持ipv6之后,ip最长长度变成46,而id还是16,客户端如果传入ipv6地址,会传更大的协议包体,服务端会解析失败。
607行最大长度是不是限制下改成FDFS_STORAGE_ID_MAX_SIZE
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/main/java/org/csource/fastdfs/TrackerClient.java at lines 604-607, then compare the parameter handling with tracker_service.c lines 2155-2168 in the linked FastDFS server source. Verify the maximum length used for storageIpAddr and test that an IPv6 value produces a protocol payload the server can parse successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100