Skip to content

Authenticate requests with the Origin header other than 127.0.0.1 #9180

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

Closed
3 tasks done
2234839 opened this issue Sep 13, 2023 · 0 comments
Closed
3 tasks done

Authenticate requests with the Origin header other than 127.0.0.1 #9180

2234839 opened this issue Sep 13, 2023 · 0 comments
Assignees
Milestone

Comments

@2234839
Copy link
Member

2234839 commented Sep 13, 2023

对于来自非Origin 127.0.0.1 的请求应当需要鉴权

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

虽然不启用非 127.0.0.1 的网络伺服功能,但 127.0.0.1 的 api 却可以被随意访问,建议对于非 127.0.0.1 来源的请求也要开启鉴权才能访问

例如网站 oceanpress-js.pages.dev/ 可以直接访问未开启鉴权的思源api

这样是存在安全风险的,用户浏览器访问恶意网页之后,网页脚本可以通过思源 api 对用户发起攻击

Expected result

对于请求头Origin非本地地址的应当要求鉴权

Screenshot or screen recording presentation

No response

Version environment

- Version: v2.10.5
- Operating System: 
- Browser (if used):

Log file

none

More information

No response

@88250 88250 changed the title 对于来自非Origin 127.0.0.1 的请求应当需要鉴权 Authenticate requests with the Origin header other than 127.0.0.1 Sep 13, 2023
@88250 88250 self-assigned this Sep 13, 2023
@88250 88250 added this to the 2.10.6 milestone Sep 13, 2023
88250 added a commit that referenced this issue Sep 13, 2023

Unverified

This user has not yet uploaded their public signing key.
@88250 88250 closed this as completed Sep 13, 2023
EightDoor added a commit to EightDoor/siyuan that referenced this issue Sep 14, 2023
* commit 'a84cd4a6dd0b4afd7b082ae40377427b4eb6449b': (63 commits)
  🐛 fix siyuan-note#9178
  🎨 fix siyuan-note#9184
  🎨 dock
  🎨 resize
  🎨 resize
  🎨 siyuan-note#9182
  🎨 Improve update tx
  🎨 Improve update tx
  📝 https://ld246.com/article/1694622447855
  🎨 Improve update tx
  📝 https://ld246.com/article/1694622447855
  🎨 Sort tx queue Undo and then redo after Shift+Enter trigger status exception siyuan-note#9178
  🎨  siyuan-note#9152
  🎨 fix siyuan-note#9152
  🎨 fix siyuan-note#9179
  🎨 fix siyuan-note#9179
  🔒 Authenticate requests with the Origin header other than 127.0.0.1 Fix siyuan-note#9180
  🎨 fix siyuan-note#9177
  🎨 Update text code block line num tip
  🎨 tooltip
  ...

# Conflicts:
#	app/src/config/account.ts
EightDoor added a commit to EightDoor/siyuan that referenced this issue Sep 14, 2023
* develop: (63 commits)
  🐛 fix siyuan-note#9178
  🎨 fix siyuan-note#9184
  🎨 dock
  🎨 resize
  🎨 resize
  🎨 siyuan-note#9182
  🎨 Improve update tx
  🎨 Improve update tx
  📝 https://ld246.com/article/1694622447855
  🎨 Improve update tx
  📝 https://ld246.com/article/1694622447855
  🎨 Sort tx queue Undo and then redo after Shift+Enter trigger status exception siyuan-note#9178
  🎨  siyuan-note#9152
  🎨 fix siyuan-note#9152
  🎨 fix siyuan-note#9179
  🎨 fix siyuan-note#9179
  🔒 Authenticate requests with the Origin header other than 127.0.0.1 Fix siyuan-note#9180
  🎨 fix siyuan-note#9177
  🎨 Update text code block line num tip
  🎨 tooltip
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants