[PR #23103] [CLOSED] fix: license date comparison type error #65884

Closed
opened 2026-05-06 11:55:08 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23103
Author: @yang1002378395-cmyk
Created: 3/26/2026
Status: Closed

Base: mainHead: fix-license-date-comparison


📝 Commits (1)

  • 23a94e0 fix: 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 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>
GiteaMirror added the pull-request label 2026-05-06 11:55:08 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#65884