mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-17 03:34:29 -05:00
Escape email when creating feed for Google account
This commit is contained in:
parent
a283c3143d
commit
bdc9196b4a
@ -145,7 +145,7 @@ def get_user(sid, headers, db, refresh = true)
|
|||||||
view_name = "subscriptions_#{sha256(user.email)[0..7]}"
|
view_name = "subscriptions_#{sha256(user.email)[0..7]}"
|
||||||
PG_DB.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
|
PG_DB.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
|
||||||
SELECT * FROM channel_videos WHERE \
|
SELECT * FROM channel_videos WHERE \
|
||||||
ucid = ANY ((SELECT subscriptions FROM users WHERE email = '#{user.email}')::text[]) \
|
ucid = ANY ((SELECT subscriptions FROM users WHERE email = E'#{user.email.gsub("'", "\\'")}')::text[]) \
|
||||||
ORDER BY published DESC;")
|
ORDER BY published DESC;")
|
||||||
rescue ex
|
rescue ex
|
||||||
end
|
end
|
||||||
@ -167,7 +167,7 @@ def get_user(sid, headers, db, refresh = true)
|
|||||||
view_name = "subscriptions_#{sha256(user.email)[0..7]}"
|
view_name = "subscriptions_#{sha256(user.email)[0..7]}"
|
||||||
PG_DB.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
|
PG_DB.exec("CREATE MATERIALIZED VIEW #{view_name} AS \
|
||||||
SELECT * FROM channel_videos WHERE \
|
SELECT * FROM channel_videos WHERE \
|
||||||
ucid = ANY ((SELECT subscriptions FROM users WHERE email = '#{user.email}')::text[]) \
|
ucid = ANY ((SELECT subscriptions FROM users WHERE email = E'#{user.email.gsub("'", "\\'")}')::text[]) \
|
||||||
ORDER BY published DESC;")
|
ORDER BY published DESC;")
|
||||||
rescue ex
|
rescue ex
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user