-
Notifications
You must be signed in to change notification settings - Fork 0
fix: ensure admin password hash is updated with {bcrypt} prefix #106
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 |
|---|---|---|
|
|
@@ -59,9 +59,13 @@ <h4>Employee Login</h4> | |
| <li>Manager, doctor, and nurse accounts are handled via GitHub.</li> | ||
| <li>Your role and access are applied automatically after sign-in.</li> | ||
| </ul> | ||
| <a href="/oauth2/authorization/github" class="button button-secondary" style="width: 100%;"> | ||
| <a th:if="${githubOauthEnabled}" href="/oauth2/authorization/github" class="button button-secondary" style="width: 100%;"> | ||
| Sign in with GitHub | ||
| </a> | ||
| <div th:unless="${githubOauthEnabled}" class="panel panel-error" style="margin-top: 12px;"> | ||
| GitHub SSO is not configured in this environment. Set <code>GITHUB_CLIENT_ID</code> and | ||
| <code>GITHUB_CLIENT_SECRET</code> to enable employee login. | ||
| </div> | ||
|
Comment on lines
+65
to
+68
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. Avoid leaking internal configuration names to end users.
🛡️ Suggested softer copy- <div th:unless="${githubOauthEnabled}" class="panel panel-error" style="margin-top: 12px;">
- GitHub SSO is not configured in this environment. Set <code>GITHUB_CLIENT_ID</code> and
- <code>GITHUB_CLIENT_SECRET</code> to enable employee login.
- </div>
+ <div th:unless="${githubOauthEnabled}" class="panel panel-error" style="margin-top: 12px;">
+ Employee sign-in is temporarily unavailable. Please contact your administrator.
+ </div>🤖 Prompt for AI Agents |
||
| </section> | ||
| </div> | ||
| </main> | ||
|
|
||
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.
🧩 Analysis chain
🌐 Web query:
Spring Boot application.properties unresolved placeholder default behavior strict or literal💡 Result:
In Spring Boot, the default behavior for unresolved placeholders (${...}) in application.properties depends on the context of usage. For properties loaded into
@ConfigurationPropertiesbeans: Unresolved placeholders result in the literal placeholder string being used as the value (not strict failure). This is intentional for flexibility, as confirmed in Spring Boot GitHub issues. Application startup succeeds, but the value remains as-is (e.g., ${missing}). For@Valueannotations or SpEL expressions: Unresolved placeholders cause a strict failure with IllegalArgumentException: Could not resolve placeholder..., preventing startup unless configured otherwise. Spring Boot auto-configures PropertySourcesPlaceholderConfigurer with ignoreUnresolvablePlaceholders=false by default (strict for its scope, like bean definitions and@Value). However, for@ConfigurationPropertiesbinding (via Binder/PropertySourcesPlaceholdersResolver), placeholders are resolved leniently during binding, catching exceptions and preserving literals. This distinction has been consistent across versions, including Spring Boot 3.x.Citations:
🏁 Script executed:
Repository: ithsjava25/project-backend-code-trauma-team
Length of output: 258
🏁 Script executed:
Repository: ithsjava25/project-backend-code-trauma-team
Length of output: 294
🏁 Script executed:
Repository: ithsjava25/project-backend-code-trauma-team
Length of output: 530
🏁 Script executed:
Repository: ithsjava25/project-backend-code-trauma-team
Length of output: 3104
Restore the
:nonefallback — missing defaults misconfigure the OAuth2 client registration.Removing the default means that when
GITHUB_CLIENT_ID/GITHUB_CLIENT_SECRETenvironment variables aren't set, Spring's placeholder resolver will preserve the literal strings${GITHUB_CLIENT_ID}and${GITHUB_CLIENT_SECRET}in the OAuth2ClientProperties binding (Spring's@ConfigurationPropertiesresolution is lenient, not strict). This creates an active OAuth2 client registration with invalid placeholder strings as credentials, breaking any code path that attempts to use them.Although
AuthController#isGithubOauthEnabled()(lines 58–63) is protected by its own@Value("...:none")default and will correctly returnfalse, the underlyingOAuth2ClientPropertiesbean that Spring's OAuth2 auto-configuration binds will hold the broken literal values. Restore the sentinel default to ensure everything stays consistent:🐛 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents