Commit Graph
3 Commits
Author SHA1 Message Date
Anthony StirlingandGitHub d2a4054120 Revert "[ImgBot] Optimize images" (#5293)
Reverts Stirling-Tools/Stirling-PDF#5290
2025-12-22 22:10:23 +00:00
ddba5a3eab [ImgBot] Optimize images (#5290)
## Beep boop. Your images are optimized!

Your image file size has been reduced by **20%** 🎉

<details>
<summary>
Details
</summary>

| File | Before | After | Percent reduction |
|:--|:--|:--|:--|
| /frontend/public/Login/LoginBackgroundPanel.png | 5.30kb | 2.21kb |
58.24% |
| /frontend/src-tauri/icons/icon.png | 19.17kb | 8.78kb | 54.22% |
| /frontend/public/modern-logo/logo512.png | 7.96kb | 4.49kb | 43.61% |
| /images/custom-home.png | 543.80kb | 329.50kb | 39.41% |
| /images/custom-home-dark.png | 456.09kb | 287.99kb | 36.86% |
| /frontend/public/modern-logo/logo192.png | 3.09kb | 2.06kb | 33.22% |
| /images/home.png | 98.13kb | 69.74kb | 28.93% |
| /frontend/public/classic-logo/logo512.png | 99.72kb | 78.32kb | 21.47%
|
| /frontend/public/modern-logo/Firstpage.png | 210.88kb | 169.27kb |
19.73% |
| /frontend/public/Login/Firstpage.png | 210.88kb | 169.27kb | 19.73% |
| /images/home-light.png | 56.34kb | 47.79kb | 15.19% |
| /frontend/public/Login/AddToPDF.png | 716.99kb | 627.65kb | 12.46% |
| /frontend/public/classic-logo/Firstpage.png | 405.84kb | 355.87kb |
12.31% |
| /frontend/public/classic-logo/logo192.png | 23.45kb | 21.19kb | 9.62%
|
| /frontend/src-tauri/icons/[email protected] | 19.47kb | 18.27kb | 6.16% |
|
/frontend/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png
| 26.17kb | 24.76kb | 5.38% |
| /frontend/src-tauri/icons/Square284x284Logo.png | 22.54kb | 21.41kb |
5.02% |
| /frontend/src-tauri/icons/Square310x310Logo.png | 24.80kb | 23.74kb |
4.26% |
|
/frontend/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png
| 35.56kb | 34.13kb | 4.03% |
| /frontend/src-tauri/icons/ios/[email protected] | 111.12kb | 108.22kb
| 2.61% |
|
/frontend/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png
| 16.67kb | 16.29kb | 2.28% |
| /frontend/src-tauri/icons/ios/[email protected] | 11.38kb |
11.12kb | 2.21% |
| /frontend/src-tauri/icons/ios/[email protected] | 12.33kb | 12.06kb
| 2.19% |
| /frontend/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png
| 14.63kb | 14.40kb | 1.60% |
| /frontend/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png |
14.63kb | 14.40kb | 1.60% |
| /frontend/src-tauri/icons/ios/[email protected] | 10.34kb | 10.18kb
| 1.55% |
|
/frontend/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png
| 12.01kb | 11.88kb | 1.05% |
| /frontend/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png
| 10.59kb | 10.48kb | 0.99% |
| /frontend/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png |
10.59kb | 10.48kb | 0.99% |
| /frontend/src-tauri/icons/Square150x150Logo.png | 10.96kb | 10.87kb |
0.82% |
| /frontend/src-tauri/icons/ios/[email protected] | 8.10kb | 8.04kb |
0.81% |
| /frontend/src-tauri/icons/ios/[email protected] | 8.10kb | 8.04kb |
0.81% |
| /frontend/public/Login/SecurePDF.png | 228.99kb | 227.15kb | 0.80% |
| /frontend/src-tauri/icons/Square142x142Logo.png | 10.38kb | 10.33kb |
0.46% |
| /app/core/src/main/resources/static/api-wordmark.svg | 6.39kb | 6.39kb
| 0.11% |
| /frontend/public/modern-logo/StirlingPDFLogoGreyText.svg | 6.39kb |
6.39kb | 0.11% |
| | | | |
| **Total :** | **3,489.78kb** | **2,793.14kb** | **19.96%** |
</details>

---

[📝 docs](https://imgbot.net/docs) | [:octocat:
repo](https://github.com/imgbot/ImgBot) | [🙋🏾
issues](https://github.com/imgbot/ImgBot/issues) | [🏪
marketplace](https://github.com/marketplace/imgbot)

<i>~Imgbot - Part of [Optimole](https://optimole.com/) family</i>

Signed-off-by: ImgBotApp <[email protected]>
Co-authored-by: ImgBotApp <[email protected]>
2025-12-22 16:00:54 +00:00
Dario Ghunney WareGitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>LudyEthanHealy01EthanAnthony Stirlingstirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
848ff9688b V2: Login Feature (#4701)
This PR migrates the login features from V1 into V2.

  ---
- Login via username/password
- SSO login (Google & GitHub)
-- Fixed issue where users authenticating via SSO (OAuth2/SAML2) were
identified by configurable username attributes (email,
preferred_username, etc.), causing:
  - Duplicate accounts when username attributes changed
  - Authentication failures when claim/NameID configuration changed
  - Data redundancy from same user having multiple accounts
- Added `sso_provider_id` column to store provider's unique identifier
(OIDC sub claim / SAML2 NameID)
- Added `sso_provider` column to store provider name (e.g., "google",
"github", "saml2")
  - User.java:65-69

  Backend Changes:
- Updated UserRepository with findBySsoProviderAndSsoProviderId() method
(UserRepository.java:25)
- Modified UserService.processSSOPostLogin() to implement lookup
priority:
    a. Find by (`ssoProvider`, `ssoProviderId`) first
    b. Fallback to username for backward compatibility
c. Automatically migrate existing users by adding provider IDs
(UserService.java:64-107)
- Updated saveUserCore() to accept and store SSO provider details
(UserService.java:506-566)

  OAuth2 Integration:
- CustomOAuth2UserService: Extracts OIDC sub claim and registration ID
(CustomOAuth2UserService.java:49-59)
- CustomOAuth2AuthenticationSuccessHandler: Passes provider info to
processSSOPostLogin()
(CustomOAuth2AuthenticationSuccessHandler.java:95-108)

  SAML2 Integration:
- CustomSaml2AuthenticationSuccessHandler: Extracts NameID from SAML2
assertion (CustomSaml2AuthenticationSuccessHandler.java:120-133)

  ---
- Configurable Rate Limiting

  Changes:
- Added RateLimit configuration class to ApplicationProperties.Security
(ApplicationProperties.java:314-317)
- Made reset schedule configurable: security.rate-limit.reset-schedule
(default: "0 0 0 * * MON")
- Made max requests configurable: security.rate-limit.max-requests
(default: 1000)
- Updated RateLimitResetScheduler to use @Scheduled(cron =
"${security.rate-limit.reset-schedule:0 0 0 * * MON}")
(RateLimitResetScheduler.java:16)
- Updated SecurityConfiguration.rateLimitingFilter() to use configured
value (SecurityConfiguration.java:377)

  ---
- Enable access without security features

  Backend:
- Added /api/v1/config to permitAll endpoints
(SecurityConfiguration.java:261)
- Config endpoint already returns enableLogin status
(ConfigController.java:60)

  Frontend:
- AuthProvider now checks enableLogin before attempting JWT validation
(UseSession.tsx:98-112)
- If enableLogin=false, skips authentication entirely and sets
session=null
- Landing component bypasses auth check when enableLogin=false
(Landing.tsx:42-46)
- Added createAnonymousUser() and createAnonymousSession() utilities
(springAuthClient.ts:440-464)

Closes #3046
---

## Checklist

### General

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [x] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [x] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: stirlingbot[bot] <stirlingbot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ludy <[email protected]>
Co-authored-by: EthanHealy01 <[email protected]>
Co-authored-by: Ethan <[email protected]>
Co-authored-by: Anthony Stirling <[email protected]>
Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
2025-10-24 10:49:52 +01:00