Fixed TypeError when comparing license expiry date with current date
Root Cause
The exp field from JSON is a string, but the code compared it directly with datetime.now().date(), causing:
TypeError: '<' not supported between instances of 'str' and 'datetime.date'
Fix
Added proper type conversion for exp field:
Supports ISO format strings (e.g., "2026-12-31" or "2026-12-31T00:00:00")
Supports YYYY-MM-DD format
Gracefully handles invalid date strings
Testing
Syntax check passed
Manual testing with l.data file needed
Impact
Users with l.data license files cannot use v0.8.11. This fix restores license validation.
🤖 Generated with OpenClaw AI
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/23103
**Author:** [@yang1002378395-cmyk](https://github.com/yang1002378395-cmyk)
**Created:** 3/26/2026
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `fix-license-date-comparison`
---
### 📝 Commits (1)
- [`23a94e0`](https://github.com/open-webui/open-webui/commit/23a94e0ec3a84f05175d0df7cf734c622c562149) fix: license date comparison type error
### 📊 Changes
**1 file changed** (+11 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/utils/auth.py` (+11 -1)
</details>
### 📄 Description
## Summary
- Fixes #23094
- Fixed TypeError when comparing license expiry date with current date
## Root Cause
The `exp` field from JSON is a string, but the code compared it directly with `datetime.now().date()`, causing:
```
TypeError: '<' not supported between instances of 'str' and 'datetime.date'
```
## Fix
Added proper type conversion for `exp` field:
- Supports ISO format strings (e.g., "2026-12-31" or "2026-12-31T00:00:00")
- Supports YYYY-MM-DD format
- Gracefully handles invalid date strings
## Testing
- [x] Syntax check passed
- [ ] Manual testing with `l.data` file needed
## Impact
Users with `l.data` license files cannot use v0.8.11. This fix restores license validation.
🤖 Generated with OpenClaw AI
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23103
Author: @yang1002378395-cmyk
Created: 3/26/2026
Status: ❌ Closed
Base:
main← Head:fix-license-date-comparison📝 Commits (1)
23a94e0fix: license date comparison type error📊 Changes
1 file changed (+11 additions, -1 deletions)
View changed files
📝
backend/open_webui/utils/auth.py(+11 -1)📄 Description
Summary
Root Cause
The
expfield from JSON is a string, but the code compared it directly withdatetime.now().date(), causing:Fix
Added proper type conversion for
expfield:Testing
l.datafile neededImpact
Users with
l.datalicense files cannot use v0.8.11. This fix restores license validation.🤖 Generated with OpenClaw AI
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.