-
Notifications
You must be signed in to change notification settings - Fork 13.9k
chore: Expose workspace hashed url in workspace admin page and startup logs #40685
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,7 @@ | ||||||
| import fs from 'node:fs'; | ||||||
| import path from 'node:path'; | ||||||
|
|
||||||
| import { License } from '@rocket.chat/license'; | ||||||
| // import { Users } from '@rocket.chat/models'; | ||||||
| import { Meteor } from 'meteor/meteor'; | ||||||
| import semver from 'semver'; | ||||||
|
|
@@ -48,7 +49,8 @@ Meteor.startup(async () => { | |||||
| ` MongoDB Engine: ${mongoStorageEngine}`, | ||||||
| ` Platform: ${process.platform}`, | ||||||
| ` Process Port: ${process.env.PORT}`, | ||||||
| ` Site URL: ${settings.get('Site_Url')}`, | ||||||
| ` Site URL: ${settings.get<string>('Site_Url')}`, | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The displayed Site URL comes from the raw Prompt for AI agents
Suggested change
|
||||||
| ` Hashed Site URL: ${License.getHashedWorkspaceUrl()}`, | ||||||
|
coderabbitai[bot] marked this conversation as resolved.
|
||||||
| ]; | ||||||
|
|
||||||
| if (Info.commit?.hash) { | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: These fields are returned unconditionally, but the
/infoendpoint is unauthenticated (authRequired: false). This exposesworkspaceUrlandhashedWorkspaceUrlto any anonymous caller. Move these fields inside thehasPermissionToViewStatisticsguard or to a privileged endpoint to avoid publicly disclosing workspace identifiers.Prompt for AI agents