Commit Graph

4119 Commits

Author SHA1 Message Date
Hamid Reza Mohammadi
226f7c3370 user sessions 2026-09-26 19:11:07 +03:30
Hamid Reza Mohammadi
ece7f41484 RSecurityBackedn upgrade 2026-09-26 18:45:25 +03:30
Hamid Reza Mohammadi
bbe892cdf3 security enhancements 2026-09-26 18:22:45 +03:30
Hamid Reza Mohammadi
7446057ca9 #421 geo tag moderation 2026-09-26 16:34:19 +03:30
Hamid Reza Mohammadi
221cdf9f30 xss vulnerabilities fixes 2026-09-25 17:55:27 +03:30
Hamid Reza Mohammadi
af75cc18d9 xss vulnerability fix 2026-09-25 17:46:22 +03:30
Hamid Reza Mohammadi
ce05b9be0e #421 geo tag suggestion 2026-09-25 15:38:22 +03:30
Hamid Reza Mohammadi
f5f6ddf5b1 #421 geo tag moderation 2026-09-25 15:37:03 +03:30
Hamid Reza Mohammadi
6d2f59aa22 #421 geo tag moderation 2026-09-25 15:25:54 +03:30
Hamid Reza Mohammadi
9872a4b772 #421 geo tag moderaion 2026-09-25 15:04:19 +03:30
Hamid Reza Mohammadi
13d493978a #421 geo tag moderation 2026-09-25 15:02:57 +03:30
Hamid Reza Mohammadi
fc241748e7 #421 geo tag suggestion + typo fixes in editors 2026-09-25 14:37:51 +03:30
Hamid Reza Mohammadi
aaacfe0442 #421 get tag suggestion 2026-09-25 14:06:58 +03:30
Hamid Reza Mohammadi
9cebdc7f5e #421 geo tag suggestion 2026-09-25 13:57:31 +03:30
Hamid Reza Mohammadi
7a7b2585b6 #421 geo tag suggestion 2026-09-25 13:49:54 +03:30
Hamid Reza Mohammadi
de279b75fd #421 geo tag moderation 2026-09-25 13:29:23 +03:30
Hamid Reza Mohammadi
42c4961c82 geo tag suggestion 2026-09-25 13:07:04 +03:30
Hamid Reza Mohammadi
afa5b24ded geotag edit fix 2026-09-25 12:54:51 +03:30
Hamid Reza Mohammadi
aa84dca5be fixes 2026-09-25 12:13:30 +03:30
Hamid Reza Mohammadi
2e43b67ba1 geotag: warning fix 2026-09-25 11:55:54 +03:30
Hamid Reza Mohammadi
d39869f6e1 geotag couplet selection 2026-09-25 08:58:47 +03:30
Hamid Reza Mohammadi
295ece7c7c geo tag fix 2026-09-24 08:16:51 +03:30
Hamid Reza Mohammadi
78798feb19 geotag fixes 2026-09-23 20:16:03 +03:30
Hamid Reza Mohammadi
ff8f6f3a96 geotag suggestion 2026-09-23 08:11:58 +03:30
Hamid Reza Mohammadi
0b91762f64 geo tag fix 2026-09-22 20:12:53 +03:30
Hamid Reza Mohammadi
4aef7ace1b ui for enable users to suggest geo location tags #421 2026-09-20 06:43:36 +03:30
Hamid Reza Mohammadi
f6bd5a756c enable users to suggest geo location tags #421 2026-09-18 17:34:30 +03:30
Hamid Reza Mohammadi
47011429f5 replace resitation 2026-09-17 21:08:41 +03:30
Hamid Reza Mohammadi
5344ea0b82 fixing audio player 2026-09-15 20:45:57 +03:30
Hamid Reza Mohammadi
ca84dab8d5 removing half baked music link page 2026-09-15 12:05:22 +03:30
Hamid Reza Mohammadi
3d94c92620 caching control fixes 2026-09-15 07:57:27 +03:30
Hamid Reza Mohammadi
1b2525346a tiymce bug fix applied again 2026-09-15 07:52:44 +03:30
Hamid Reza Mohammadi
e6397afae4 fix shadow 2026-09-14 20:30:50 +03:30
Hamid Reza Mohammadi
fd609f86c5
Merge pull request #509 from emohandesi/feature/music-link-suggestions
Suggest songs by pasting a link, instead of the broken Spotify search
2026-09-14 15:43:46 +03:30
Hamid Reza Mohammadi
de82d2cca6
Merge pull request #508 from emohandesi/fix/public-data-import-httpclient
Fix public data import failing with ObjectDisposedException
2026-09-14 15:43:04 +03:30
Hamid Reza Mohammadi
ecbf9bdcb6
Merge pull request #507 from emohandesi/fix/login-redirect-encoding
Fix 500 error page on failed login
2026-09-14 15:42:29 +03:30
Ehsan Mohandesi
9063f9d732 Give the public data import job its own HttpClient
StartImportFromPublicDataRepo captured the injected, request-scoped HttpClient
inside the queued work item. The request completes long before the background
job runs, so the client was already disposed and the import died immediately
with ObjectDisposedException. Let the job own a client for its lifetime.
2026-09-13 22:16:28 -05:00
Ehsan Mohandesi
e7fbc6559d Fix 500 on failed login by encoding the redirect parameters
After a rejected login the site redirects back to /login carrying the API's
error message in the query string. That message is Persian, and HTTP header
values must be ASCII, so Kestrel threw InvalidOperationException and the user
got an error page instead of the login form with the reason for the failure.
Encode both the path and the message.

Not noticed before because IIS Express tolerates the non-ASCII Location header;
it surfaces as soon as the site is run on Kestrel.
2026-09-13 22:16:28 -05:00
Ehsan Mohandesi
cb7b1b03a3 Replace Spotify search with a validated music link box
The Spotify Web API integration stopped working, leaving /spotify unable to
suggest songs at all. Replace the artist/album/track search flow with a single
box where the user pastes a link to the track on a music service.

Links are checked against a hardcoded allow-list of legal streaming and store
domains so links to ripped audio cannot be submitted. The check lives in the
service layer, not just the page: any authenticated user can POST to
/api/ganjoor/song directly and bypass the UI. Hosts are matched against the
full host or a dot-prefixed suffix, so look-alikes such as
open.spotify.com.evil.com are rejected; https is required, and userinfo and
non-default ports are refused. Accepted URLs are canonicalised - https,
lowercased host, tracking parameters stripped - so the same track always yields
the same stored URL and duplicate detection actually works.

Links are stored under one new type, PoemMusicTrackType.MusicUrl, with the
platform derived from the host at render time. That needs no migration or
backfill, and supporting another service later needs no new enum value. The
duplicate check no longer keys on TrackType, which closes a gap where the same
URL could be resubmitted as a different type. Several links per poem remain
allowed; only an identical URL for the same poem is refused.

The Spotify search page and its OAuth plumbing are kept and simply redirect to
/musiclink while the existing SpotifyWorking flag is false, so the old flow can
be restored if that API ever works again.

Track URLs are no longer written through Html.Raw into href attributes. They
previously came from the Spotify API; now that they are user supplied, encoding
them prevents stored XSS.

Also fixes two latent bugs in SuggestSong that this flow would have hit: a null
dereference when TrackUrl is empty, and a singer lookup that matched any singer
with an empty Url.
2026-09-13 22:16:18 -05:00
Hamid Reza Mohammadi
7f76c5c9c1 caching fixes 2026-09-13 14:56:55 +03:30
Hamid Reza Mohammadi
0811bfd868 moderation new option 2026-09-13 13:39:48 +03:30
Hamid Reza Mohammadi
4920e85e45 include couplet sumaries in public data export 2026-09-12 16:06:54 +03:30
Hamid Reza Mohammadi
de3dbeefaa caching fix 2026-09-12 15:35:27 +03:30
Hamid Reza Mohammadi
da0648606e caching improvements 2026-09-12 15:05:43 +03:30
Hamid Reza Mohammadi
91bfd79465 tajik recitation fix 2026-09-12 13:28:23 +03:30
Hamid Reza Mohammadi
652c9ac43e tajik recitation player improvments 2026-09-12 13:24:45 +03:30
Hamid Reza Mohammadi
fb87847d65 recitation icons fix 2026-09-12 12:23:36 +03:30
Hamid Reza Mohammadi
157565496d lock on recitation 2026-09-12 12:15:01 +03:30
Hamid Reza Mohammadi
566ff6d002 go to current position of recitation 2026-09-12 09:42:42 +03:30
Hamid Reza Mohammadi
5ebf07d485 bottpm audio player 2026-09-12 07:38:52 +03:30