Skip to content

fix(appointments): validate availability input - #8862

Merged
SebastianKrupinski merged 1 commit into
nextcloud:mainfrom
Kumar-s75:fix/appointment-availability-validation
Sep 5, 2026
Merged

fix(appointments): validate availability input#8862
SebastianKrupinski merged 1 commit into
nextcloud:mainfrom
Kumar-s75:fix/appointment-availability-validation

Conversation

@Kumar-s75

Copy link
Copy Markdown
Contributor

Summary

  • Validate appointment availability timezone identifiers.
  • Reject malformed weekday slot containers and slots with non-integer or reversed timestamps.
  • Add regression tests for invalid timezone, day, and slot values.

Fixes #8859.

Testing

  • php -l lib/Controller/AppointmentConfigController.php
  • php -l tests/php/unit/Controller/AppointmentConfigControllerTest.php
  • git diff --check
  • PHPUnit could not run locally because the phpunit executable is not available in the workspace.

Comment thread lib/Controller/AppointmentConfigController.php
@SebastianKrupinski

Copy link
Copy Markdown
Contributor

Hi @Kumar-s75

Thank you for the PR

@Kumar-s75

Copy link
Copy Markdown
Contributor Author

Addressed in commit 2a6874454. Removed the redundant !is_array($slot) condition as suggested; the existing isset() and type checks remain unchanged. PHP syntax and diff checks pass locally. The focused PHPUnit test is still blocked because phpunit is not available in this checkout.

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@SebastianKrupinski
SebastianKrupinski force-pushed the fix/appointment-availability-validation branch from 2a68744 to ccdbfdb Compare September 5, 2026 12:24
Signed-off-by: Kumar Saurabh <kumarsaurabh27d@gmail.com>
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/appointment-availability-validation branch from ccdbfdb to 48fd71f Compare September 5, 2026 12:43
@SebastianKrupinski

Copy link
Copy Markdown
Contributor

Addressed in commit 2a6874454. Removed the redundant !is_array($slot) condition as suggested; the existing isset() and type checks remain unchanged. PHP syntax and diff checks pass locally. The focused PHPUnit test is still blocked because phpunit is not available in this checkout.

Looks like removing the array check made psalm unhappy. I dropped the second commit

@SebastianKrupinski
SebastianKrupinski merged commit 4b45316 into nextcloud:main Sep 5, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Appointment availability accepts malformed slot and timezone data

2 participants