Commit Graph

825 Commits

Author SHA1 Message Date
Hamid Reza Mohammadi
ab254fefd5 commennt sanitization 2026-09-26 21:32:02 +03:30
Hamid Reza Mohammadi
748b4b5b0a comment sanitzier 2026-09-26 20:50:24 +03:30
Hamid Reza Mohammadi
d7e6678395 sql inj fixes 2026-09-26 19:52:59 +03:30
Hamid Reza Mohammadi
ce05b9be0e #421 geo tag suggestion 2026-09-25 15:38:22 +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
de279b75fd #421 geo tag moderation 2026-09-25 13:29:23 +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
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
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
4920e85e45 include couplet sumaries in public data export 2026-09-12 16:06:54 +03:30
Hamid Reza Mohammadi
32041f4e65 Search should include title texts wherever title carries important context
#506
2026-09-04 15:55:07 +03:30
Hamid Reza Mohammadi
f379fcdbae updating nugets 2026-09-04 15:18:37 +03:30
Hamid Reza Mohammadi
73fbfd7f76 improving accessing contents in the bio section 2026-09-01 21:44:25 +03:30
Hamid Reza Mohammadi
97f3d7f6f9 tajik public data #498 2026-08-16 18:15:28 +03:30
Hamid Reza Mohammadi
978c6f6e0e tajik + persian text backend 2026-08-16 16:53:49 +03:30
Hamid Reza Mohammadi
fbb2700afb #498 fix 2026-08-16 15:26:58 +03:30
Hamid Reza Mohammadi
ae6ff5ba28 #498 fixes 2026-08-15 12:10:18 +03:30
Hamid Reza Mohammadi
6df8b587a9 #498 git fix 2026-08-15 08:09:55 +03:30
Hamid Reza Mohammadi
c030a192d2 #498 export tajik data 2026-08-14 21:44:19 +03:30
Hamid Reza Mohammadi
a1b7c2fa12 #498 fixes 2026-08-14 20:04:14 +03:30
Hamid Reza Mohammadi
6c369e7477 #498 compile fix 2026-08-14 20:01:11 +03:30
Hamid Reza Mohammadi
31d37c1f50 #498 readme file 2026-08-14 19:55:16 +03:30
Hamid Reza Mohammadi
1d67041247 #498 bug fix 2026-08-14 19:39:48 +03:30
Hamid Reza Mohammadi
47f3297cf0 #498 fix 2026-08-14 15:44:42 +03:30
Hamid Reza Mohammadi
a19c8a3128 #498 import public data 2026-08-14 15:02:44 +03:30
Hamid Reza Mohammadi
0fb3110dd9 #498 imprort public data 2026-08-14 14:57:00 +03:30
Hamid Reza Mohammadi
6768ee4c52 #498 export public data 2026-08-14 13:49:57 +03:30
Hamid Reza Mohammadi
ae50557acc Open source all public data
#498
2026-08-14 13:37:43 +03:30
Hamid Reza Mohammadi
eb452cb322 tajik backend fix 2026-08-08 08:04:48 +03:30
Hamid Reza Mohammadi
a1eaddc5a3 tajik api backend bug fix 2026-08-07 18:58:46 +03:30
Hamid Reza Mohammadi
9a70dc333c tajik fix 2026-08-07 17:41:52 +03:30
Hamid Reza Mohammadi
35947fc1f7 tajik backend fix 2026-08-07 17:21:20 +03:30
Hamid Reza Mohammadi
ad8afedac4 tajik backend 2026-08-07 17:10:23 +03:30
Hamid Reza Mohammadi
cefc6a767f tajik backend fixes 2026-08-07 17:02:54 +03:30
Hamid Reza Mohammadi
a6e7d4f4e6 tajik api fix 2026-08-07 16:28:35 +03:30
Hamid Reza Mohammadi
ff3e82e897 #495 comment ratings 2026-08-04 18:24:35 +03:30
Hamid Reza Mohammadi
ca2f708add #495 rating comments 2026-08-04 15:47:05 +03:30
Hamid Reza Mohammadi
1b613ba397 #495 rating comments 2026-08-04 14:59:58 +03:30
Hamid Reza Mohammadi
9d32aa27c0 #495 RateCommentAsync 2026-07-22 19:30:16 +03:30
Hamid Reza Mohammadi
97e472af9a #495 RateCommentAsync 2026-07-22 19:15:15 +03:30
Hamid Reza Mohammadi
60ade5b000 fix comments having style in their html 2026-07-21 18:16:06 +03:30
Hamid Reza Mohammadi
0d2f7b7ff9 adding html sanitizer to comments 2026-07-20 18:35:59 +03:30
Hamid Reza Mohammadi
b99b6439b1 ui fix 2026-07-20 17:10:32 +03:30
Hamid Reza Mohammadi
bc6c059ded ganjoor.net/vazn fix 2026-07-20 15:02:03 +03:30
Hamid Reza Mohammadi
f0eea6f655 fixes for ganjoor.net/vazn 2026-07-20 14:48:25 +03:30
Hamid Reza Mohammadi
5fa9eaf7db fixing ganjoor.net/vazn 2026-07-20 14:02:58 +03:30
Hamid Reza Mohammadi
d48b6cd3a7 #494 backup ftp server 2026-07-10 16:35:23 +03:30
Hamid Reza Mohammadi
56d7f0f25c #494 backup ftp server 2026-07-10 16:30:51 +03:30
Hamid Reza Mohammadi
93f6e7c335 #487 generate detailed contents for digital sources entries 2026-06-22 16:12:06 +03:30
Hamid Reza Mohammadi
22c2759274 #487 generate detailed contents for digital sources entries 2026-06-22 16:05:38 +03:30