Monadical-SAS / oddslingers.poker

The Django + React codebase powering the free, open-source poker platform: OddSlingers.com
https://oddslingers.com
GNU Lesser General Public License v2.1
59 stars 18 forks source link

Create User function can't run properly. #14

Open 1itt1eB0y opened 5 months ago

1itt1eB0y commented 5 months ago

when you create a new user (cmd or web either), it will only add record in oddslingers_user table. with docker-compose.yml and default config. I manually added root to the stats table。 here is the POC

DO
$$
DECLARE
    _table_name text;
    _column_name text;
    _uuid text := 'b43794a3-d81b-42fa-90a7-791e5e7ad864';
    _query text;
    _result int;
BEGIN
    FOR _table_name, _column_name IN (SELECT table_name, column_name FROM information_schema.columns WHERE table_schema = 'public' AND data_type = 'uuid')
    LOOP
        _query := format('SELECT COUNT(*) FROM %I WHERE %I = %L', _table_name, _column_name, _uuid);
        EXECUTE _query INTO _result;
        IF _result > 0 THEN
            RAISE NOTICE 'Table % contains the UUID', _table_name;
        END IF;
    END LOOP;
END
$$

图片

web error screenshots 图片 图片 图片 图片