跳转到内容

小天管理

管理员
  • 注册日期

  • 最后上线

小天管理 发表的所有内容

  1. 系统升级到了 MacOS Sequoia,升级后发现公司 IT 不支持,需要降级到 Sonoma,之前没有备份,请问到直营店降级需要付费吗?已经过保.
  2. 直播评论区跟已关注的其他人错乱 其实这种 bug 本质上跟阿里云隐私那个成因没啥大区别
  3. 发了一个链接给朋友,*.pages.dev 地址,无法在微信内打开。
  4. 这人好像今年和去年这个时候都有惊人的言论,顶着一个通信专家的头衔,具体言论是什么我就不说了。不过刚才还是去了一下此人的微博看了看,我都懒得骂了,好像像这样的人和言论最近几年在国个都挺多而且很吃香了
  5. 最近公司引入了 SYNK 用作软件漏斗扫描工具,它给 mybatis plus 报 CVE-2022-25517 ,如果解决不了我就得把好大段代码用 JPA 或者 mybatis dynamic sql 重构。但我研究了下,我真心觉得这个如果是个有效的 CVE issue ,那 mybatis 也跑不了。 以下是正文。各位看了后觉得呢? Background Here is the POC and root cause why CVE-2022-25517 was generated: POC But without mybatis-plus, only using mybatis, we can reproduce the same issue. Please check this demo: https://github.com/XSun771/demos/tree/mybatis-sql-injection By this demo, I want to prove that CVE-2022-25517 should not be an CVE issue. At least if it is, then it is also applicable to Mybatis. Instead, it should be a bad code smell. My POC code @Select("SELECT * FROM ARTICLES WHERE ${columnName} = #{columnValue}") List<Article> select(@Param("columnName") String columnName, @Param("columnValue") String columnValue); I know you may say , "oh, it is highlighted by Mybatis developers that you should not use ${} but #{} which will check sql injection". But I must highlight that it is also highlighted in mybatis-plus official documents that everyone needs to do SQL inject check first. So if you agree that because mybatis developers highlights that you should not use ${} then there is no need to raise CVE issue for mybatis, then why not agree that no need to raise CVE issue to mybatis-plus? @RequestMapping("/enquiry") public String enquiry(@RequestBody Enquiry enquiry) { return this.articleMapper.select(enquiry.getColumnName(),enquiry.getColumnValue()).toString(); } attack I made usage of IDEA http client, the script file is at src/main/resources/generated-requests.http. POST http://localhost:9000/enquiry Content-Type: application/json { "columnName": "(id=1) UNION SELECT * FROM ARTICLES WHERE 1=1 OR id", "columnValue": "1" } Attachk result: 2024-09-16T11:42:48.220+08:00 DEBUG 2736 --- [mybatis-sql-injection] [nio-9000-exec-2] c.e.m.ArticleMapper.select : ==> Preparing: SELECT * FROM ARTICLES WHERE (id=1) UNION SELECT * FROM ARTICLES WHERE 1=1 OR id = ? 2024-09-16T11:42:48.229+08:00 DEBUG 2736 --- [mybatis-sql-injection] [nio-9000-exec-2] c.e.m.ArticleMapper.select : ==> Parameters: 1(String) 2024-09-16T11:42:48.244+08:00 DEBUG 2736 --- [mybatis-sql-injection] [nio-9000-exec-2] c.e.m.ArticleMapper.select : <== Total: 3 [Article(id=1, title=foo, author=foo), Article(id=2, title=bar, author=bar), Article(id=3, title=333, author=333)]
  6. 新下了 15plus ,安卓刚转过来,该开哪个区的账号? 另外,目前那个版本比较好?有第三方软件的需求,巨魔还是哪个方案比较好。
  7. 现在冷启动微信已经要等十几秒了。。。 升级 iOS18 会更糟嘛?
  8. 想申请桥接拨号,所以先请问一下关于上海精品网 58.32 网段拨号难度问题。 如果想拨号到 58.32 网段,一般情况下需要拨号多少次才能够成功? 拨号到 58.32 网段后,通常情况下该 IP 可以保持几天需要再次拨号? 如果真的很难拨号到 58.32 网段,那就不折腾了。 谢谢!
  9. 起初是项目需要,找设计师频繁修改,为了方便自己用,开源出来,给需要用到的大佬。 效果 在线制作地址 beautiful-window 项目已开源 GitHub 使用案例:tomato-work 、 nav
  10. 如题, 手头有块 SE 第一代, 今天手机手机更完 iOS 18 以后 使劲刷新手表就是没更新, 一看官网 原来已经惨遭 watchOS 11 淘汰了.
  11. macos Sequoia 15.0 推送了,正在更新中。。。。
  12. 使用背景: 经常使用的 Safari ,visual studio code ,email ,telegram loon Apple music 扩展就是 wipr 偶尔一些其他的软件 Microsoft Excel ,infuse 很流畅哈 iPhone mirror 很 nice 8gb 目前感觉不到什么变化 兄弟们可以分享一下吧
  13. macos Sequoia 15.0 推送了,正在更新中
  14. 想着 Apple Intelligence 即将推出想尝尝鲜,也打算买港版 iPhone 16 Pro 便考虑了 ID 转区事由。搜寻一番互联网发现目前主流方式貌似是将所有 iCloud 资料下载 / 备份至本机后登录新注册的其他地区账号,但遗憾的是我的照片图库里有 10w+ 照片而且不少是 JPG+RAW 和实况照片,而且机内空间也不大够所以就没有考虑这种方式更换地区。 本着付款方式较为方便为由,我在取消所有软件的付费订阅后把 iCloud 的 Apple ID 有中国大陆转为了港区。在验证 iCloud.com 可以登录 ID 且设备均弹出新的使用协议之后,我相信应该是转区成功了,但是依旧无法激活 Apple Intelligence ,在设置界面会遇到两种情况: ·Join waitlist ,在二级界面 Join 之后没有任何相关状态的改变,依旧是 Siri 界面。 ·Apple Intelligence 开关为打开,相关内容提示 99% downloading ,Siri 界面。 然而使用原生在美国地区的 ID 是可以下载并使用的,并且看到社交媒体上也有其他用户反馈这一问题,想问问各位同僚 / 老师们有没有什么比较合适的解决方法。 感激不尽。
  15. 正式版推送,刚刚升级体验了 30 分钟,已经想让我回去了。 1. 取消了负一屏所有的旧版小组件,开个代理都没快捷键了。 2. 相册「前所未有」的更新就是这?! 3. Reeder 中正文字体全部变为粗体且无法更改。
  16. 近日,网络安全技术公司“安博通”在其公众号发文称,学校通过部署该公司的设备,可以精准识别翻墙软件,并通过翻墙 Ip 反溯、实名到人、精准定位,准确“逮捕”还可以针对学生翻墙行为自定义生成报表,不仅能查看翻墙趋势,还能查看应用、用户分布、将翻墙行为全记录的同时,辅助教师完成业绩汇报。 只讨论技术问题,这不应该只能检测到连接的服务器吗,还能检测到背后访问的网站 ?
  17. 前情提要可以看下我在去年刚更新 ios17 后发的贴子。 www.v2ex.com/t/982258 主要就是在非 https 网页无法自动填充密码。 然后不知道在 ios17 哪个小版本更新之后,突然又可以自动填充了,内心还在感慨苹果终于开窍了,今天更新完 18 以后,好家伙,又给变回去了,又不给填充了,干啥呢这是。
  18. 只有一个监控头,目前弄了个黑群,如果有平替的黑群晖不要了。
  19. 以前收藏过一个,404 了;最近谷歌了几个,发现只能看到 22 年底的 https://v2hot.vercel.app/hot/hottest-30/,没法看到最新的
  20. 原文地址: https://yojigen.tech/33.html 前言 之前折腾了使用 Docker 在 NAS 里部署桌面版 AnyType 客户端,用来局域网同步数据。 但是我还是不死心,还是想试试部署官方的同步服务。于是又研究了一天,得出了这个新的方案。 分析官方 docker 结构 官方是有着一个github 仓库用来部署 docker 的。 配置很复杂,而且一些服务的设置有些迷惑,类似redis,mongo,minio之类的服务其实都没必要把端口映射出来,一些官方的镜像也完全没有必要用Dockerfile自己编译,直接用官方的镜像就行。 于是我就想能不能把他的镜像优化一下,所以先看看他的镜像都有什么。 源文件: https://github.com/anyproto/any-sync-dockercompose/blob/main/docker-compose.yml 根据源文件的 service 字段,从上到下的服务一共有这些。 generateconfig-anyconf generateconfig-processing mongo-1 redis minio create-bucket any-sync-coordinator_bootstrap any-sync-coordinator any-sync-filenode any-sync-node-1 any-sync-node-2 any-sync-node-3 any-sync-consensusnode netcheck generateconfig-anyconf是用于创建配置的。 generateconfig-processing是用来判断配置是否创建完成的。 any-sync-coordinator_bootstrap也是用来判断配置是否正确的。 netcheck是检测配置和网络是否正确的。 换句话说其实上面这 4 个镜像都没有必要启动,是完全可以去掉的。 创建正确的配置 AnyType 官方的 docker 配置,是要用户使用make start命令来自动创建出来一些配置,然后再将client.yml导入到客户端,实现私有化部署。 那么如何才能创建出来正确的配置呢? 官方实际上有另一个工具https://github.com/anyproto/any-sync-tools。这个库内含两个二进制程序。any-sync-network用于创建网络配置,any-sync-netcheck用于检查网络配置。 我们可以下载any-sync-tools二进制文件,里面内含了一个defaultTemplate.yml文件。这是网络配置的模板参数,我们可以修改其中的一部分 IP 和端口配置,然后用这个模板创建自己的配置。 # 这里添加你的同步服务的地址/域名,可以填写多个 # 同时需要填写一个 docker 宿主的可访问 IP ,用于让镜像内部可以访问到其他镜像的端口 external-addresses: - 172.123.234.1 - 127.0.0.1 any-sync-consensusnode: listen: any-sync-consensusnode yamuxPort: 4530 quicPort: 5530 mongo: # 这里修改了 mongo 的地址 connect: mongodb://mongo:27017/?w=majority database: consensus any-sync-coordinator: listen: any-sync-coordinator yamuxPort: 4630 quicPort: 5630 mongo: # 这里修改了 mongo 的地址 connect: mongodb://mongo:27017 database: coordinator defaultLimits: spaceMembersRead: 1000 spaceMembersWrite: 1000 sharedSpacesLimit: 1000 any-sync-filenode: listen: any-sync-filenode yamuxPort: 4730 quicPort: 5730 s3Store: # 这里修改了 minio 的地址 endpoint: http://minio:9000 bucket: minio-bucket indexBucket: minio-bucket region: us-east-1 profile: default forcePathStyle: true redis: # 这里修改了 redis 的地址 url: redis://redis:6379?dial_timeout=3&read_timeout=6s defaultLimit: 1099511627776 any-sync-node: listen: - any-sync-node-1 - any-sync-node-2 - any-sync-node-3 yamuxPort: 4430 quicPort: 5430 修改完成后,在当前目录执行。 any-sync-network create --auto 可以一键创建配置,配置文件在etc目录下,其中client.yml就是给客户端用的配置文件。 本以为配置到这里就结束了,但是实际上还有一个隐藏的关于 s3 的配置,我最开始就是因为没有注意这个配置,导致一开始文件都不能同步,只能同步文本。 在etc目录下,需要创建一个.aws目录,然后在.aws目录中,创建一个credentials文件,文件内容如下。这个文件的内容是和后面的docker-compose.yml对应的,可以酌情修改。 [default] aws_access_key_id=user aws_secret_access_key=password 部署 docker 我创建了一个新的docker-compose.yml文件,里面的配置和端口是和上面的配置对应的,如果你有自己的想法,可以酌情修改。 services: mongo: image: mongo:4 restart: unless-stopped command: ["--replSet", "rs0", "--port", "27017"] volumes: - ./storage/mongo/:/data/db networks: - network healthcheck: test: mongo --port 27017 --eval 'rs.initiate({"_id":"rs0","members":[{"_id":0,"host":"mongo:27017"}]})' interval: 10s start_period: 30s redis: image: redis/redis-stack-server:latest restart: unless-stopped command: ["redis-server", "--port", "6379", "--dir", "/data/", "--appendonly", "yes", "--maxmemory", "256mb", "--maxmemory-policy", "noeviction", "--protected-mode", "no", "--loadmodule", "/opt/redis-stack/lib/redisbloom.so"] volumes: - ./storage/redis/:/data/ networks: - network healthcheck: test: [ "CMD", "redis-cli", "--raw", "-p", "6379", "incr", "ping" ] interval: 10s timeout: 30s retries: 3 minio: image: minio/minio:latest restart: unless-stopped command: ["server", "/data", "--console-address", ":9001", "--address", ":9000"] environment: MINIO_ROOT_USER: "user" MINIO_ROOT_PASSWORD: "password" volumes: - ./storage/minio:/data healthcheck: test: bash -c ':> /dev/tcp/127.0.0.1/9000' || exit 1 interval: 5s timeout: 10s retries: 3 networks: network: aliases: - "minio-bucket.minio" create-bucket: image: minio/mc:latest depends_on: - minio networks: - network entrypoint: > /bin/sh -c " until (/usr/bin/mc alias set minio http://minio:9000 'user' 'password') do echo '...waiting...' && sleep 1; done; /usr/bin/mc mb minio/minio-bucket; exit 0; " any-sync-consensusnode: image: ghcr.io/anyproto/any-sync-consensusnode:latest depends_on: any-sync-coordinator: condition: service_started ports: - "4530:4530" - "5530:5530/udp" volumes: - ./etc/any-sync-consensusnode/:/etc/any-sync-consensusnode/ - ./storage/networkStore/any-sync-consensusnode/:/networkStore/ networks: - network deploy: resources: limits: memory: 500M restart: unless-stopped any-sync-coordinator: image: ghcr.io/anyproto/any-sync-coordinator:latest depends_on: mongo: condition: service_healthy ports: - "4630:4630" - "5630:4630/udp" volumes: - ./etc/any-sync-coordinator/:/etc/any-sync-coordinator/ - ./storage/networkStore/any-sync-coordinator/:/networkStore/ networks: - network deploy: resources: limits: memory: 500M restart: unless-stopped any-sync-filenode: image: ghcr.io/anyproto/any-sync-filenode:latest depends_on: redis: condition: service_healthy minio: condition: service_healthy any-sync-coordinator: condition: service_started ports: - "4730:4730" - "5730:5730/udp" volumes: - ./etc/any-sync-filenode/:/etc/any-sync-filenode/ - ./etc/.aws:/root/.aws:ro - ./storage/networkStore/any-sync-filenode/:/networkStore/ networks: - network deploy: resources: limits: memory: 500M restart: unless-stopped any-sync-node-1: image: ghcr.io/anyproto/any-sync-node:latest depends_on: any-sync-coordinator: condition: service_started ports: - "4430:4430" - "5430:5430/udp" volumes: - ./etc/any-sync-node-1/:/etc/any-sync-node/ - ./storage/any-sync-node-1/:/storage/ - ./storage/networkStore/any-sync-node-1/:/networkStore/ networks: - network deploy: resources: limits: memory: 500M restart: unless-stopped any-sync-node-2: image: ghcr.io/anyproto/any-sync-node:latest depends_on: any-sync-coordinator: condition: service_started ports: - "4431:4431" - "5431:5431/udp" volumes: - ./etc/any-sync-node-2/:/etc/any-sync-node/ - ./storage/any-sync-node-2/:/storage/ - ./storage/networkStore/any-sync-node-2/:/networkStore/ networks: - network deploy: resources: limits: memory: 500M restart: unless-stopped any-sync-node-3: image: ghcr.io/anyproto/any-sync-node:latest depends_on: any-sync-coordinator: condition: service_started ports: - "4432:4432" - "5432:5432/udp" volumes: - ./etc/any-sync-node-3/:/etc/any-sync-node/ - ./storage/any-sync-node-3/:/storage/ - ./storage/networkStore/any-sync-node-3/:/networkStore/ networks: - network deploy: resources: limits: memory: 500M restart: unless-stopped # gateway 的 IP 需要添加到之前配置模板里面,我上面已经添加过了 # 如果有 IP 地址冲突,请自行修改 networks: network: ipam: driver: default config: - subnet: 172.123.234.0/24 gateway: 172.123.234.1 然后将etc复制到同目录下,启动镜像即可。 现成的配置 我把我的配置放在了 github 库里。你可以直接使用我的配置(但是还是要添加你的服务器 IP )。 仓库地址: https://github.com/mouyase/anytype-docker-compose 客户端使用提示 如果你现在已经有了一个 AnyType 的库,记得先把库导出,然后切换私有化部署方案,创建新的库,再导入。 一个其他服务上的旧的库,是没有办法直接在另一个服务中打开的,每一个服务都需要创建一个新的库,再导入旧数据才能正常使用。请一定要注意。 尾声 我在 NAS 上部署了这套服务,然后再用 frp 做了内网穿透。局域网下走本地 IP ,在外网则使用 frp 转发 IP 。同时内网客户端还能 P2P 同步。这下终于可以稳妥的做到私有化同步了。 接下来该试着学一学 AnyType 的体系,看看能不能彻底替换掉 Notion 使用啦。
  21. 帮我的一个程序员朋友问个问题,他自己独立开发了一个小众领域的 PC 端软件(非安卓,非苹果 App ),主要在专业领域内销售,客户 99.9%在国外,单价几十美元,目前此软件一年收入几万刀吧。 主要交易方式就是让对方汇款到银行账户,然后激活 软件。当然试过信用卡收款,如果客户来自欧美还好,信用卡收款比较顺利,但是当客户来自东南亚或南美时候等欠发达地区时,信用卡收款经常出现各种莫名其妙的问题,比较扯皮。 前几天想改成 paypal 收款,发现 paypal 也有很多坑,账户容易被封,手续费高,汇率太坑。请问各位前辈大佬,除了转账,信用卡,paypal ,目前还有什么靠谱的国际收款方式吗?加密币就算了,这东西太小众,人家不会因为想买你软件还专门开了加密币账户。 转账(效率低,手续麻烦) 信用卡(发展中国家,东南亚,南美地区经常出问题) paypal (坑多,封号,手续费高,汇率问题) 还请有经验的 老哥指教下,哪种收款方式靠谱,先谢过了!