forked from danswer-ai/danswer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'danswer-ai:main' into main
- Loading branch information
Showing
147 changed files
with
6,252 additions
and
1,739 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# https://github.com/madler/zlib/issues/868 | ||
# Pulled in with base Debian image, it's part of the contrib folder but unused | ||
# zlib1g is fine | ||
# Will be gone with Debian image upgrade | ||
# No impact in our settings | ||
CVE-2023-45853 | ||
|
||
# krb5 related, worst case is denial of service by resource exhaustion | ||
# Accept the risk | ||
CVE-2024-26458 | ||
CVE-2024-26461 | ||
CVE-2024-26462 | ||
CVE-2024-26458 | ||
CVE-2024-26461 | ||
CVE-2024-26462 | ||
CVE-2024-26458 | ||
CVE-2024-26461 | ||
CVE-2024-26462 | ||
CVE-2024-26458 | ||
CVE-2024-26461 | ||
CVE-2024-26462 | ||
|
||
# Specific to Firefox which we do not use | ||
# No impact in our settings | ||
CVE-2024-0743 | ||
|
||
# bind9 related, worst case is denial of service by CPU resource exhaustion | ||
# Accept the risk | ||
CVE-2023-50387 | ||
CVE-2023-50868 | ||
CVE-2023-50387 | ||
CVE-2023-50868 | ||
|
||
# libexpat1, XML parsing resource exhaustion | ||
# We don't parse any user provided XMLs | ||
# No impact in our settings | ||
CVE-2023-52425 | ||
CVE-2024-28757 | ||
|
||
# sqlite, only used by NLTK library to grab word lemmatizer and stopwords | ||
# No impact in our settings | ||
CVE-2023-7104 | ||
|
||
# libharfbuzz0b, O(n^2) growth, worst case is denial of service | ||
# Accept the risk | ||
CVE-2023-25193 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
backend/alembic/versions/38eda64af7fe_add_chat_session_sharing.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"""Add chat session sharing | ||
Revision ID: 38eda64af7fe | ||
Revises: 776b3bbe9092 | ||
Create Date: 2024-03-27 19:41:29.073594 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "38eda64af7fe" | ||
down_revision = "776b3bbe9092" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.add_column( | ||
"chat_session", | ||
sa.Column( | ||
"shared_status", | ||
sa.Enum( | ||
"PUBLIC", | ||
"PRIVATE", | ||
name="chatsessionsharedstatus", | ||
native_enum=False, | ||
), | ||
nullable=True, | ||
), | ||
) | ||
op.execute("UPDATE chat_session SET shared_status='PRIVATE'") | ||
op.alter_column( | ||
"chat_session", | ||
"shared_status", | ||
nullable=False, | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.drop_column("chat_session", "shared_status") |
23 changes: 23 additions & 0 deletions
23
backend/alembic/versions/475fcefe8826_add_name_to_api_key.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"""Add name to api_key | ||
Revision ID: 475fcefe8826 | ||
Revises: ecab2b3f1a3b | ||
Create Date: 2024-04-11 11:05:18.414438 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "475fcefe8826" | ||
down_revision = "ecab2b3f1a3b" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.add_column("api_key", sa.Column("name", sa.String(), nullable=True)) | ||
|
||
|
||
def downgrade() -> None: | ||
op.drop_column("api_key", "name") |
81 changes: 81 additions & 0 deletions
81
backend/alembic/versions/72bdc9929a46_permission_auto_sync_framework.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
"""Permission Auto Sync Framework | ||
Revision ID: 72bdc9929a46 | ||
Revises: 475fcefe8826 | ||
Create Date: 2024-04-14 21:15:28.659634 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "72bdc9929a46" | ||
down_revision = "475fcefe8826" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.create_table( | ||
"email_to_external_user_cache", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("external_user_id", sa.String(), nullable=False), | ||
sa.Column("user_id", sa.UUID(), nullable=True), | ||
sa.Column("user_email", sa.String(), nullable=False), | ||
sa.ForeignKeyConstraint( | ||
["user_id"], | ||
["user.id"], | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_table( | ||
"external_permission", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("user_id", sa.UUID(), nullable=True), | ||
sa.Column("user_email", sa.String(), nullable=False), | ||
sa.Column( | ||
"source_type", | ||
sa.String(), | ||
nullable=False, | ||
), | ||
sa.Column("external_permission_group", sa.String(), nullable=False), | ||
sa.ForeignKeyConstraint( | ||
["user_id"], | ||
["user.id"], | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
op.create_table( | ||
"permission_sync_run", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column( | ||
"source_type", | ||
sa.String(), | ||
nullable=False, | ||
), | ||
sa.Column("update_type", sa.String(), nullable=False), | ||
sa.Column("cc_pair_id", sa.Integer(), nullable=True), | ||
sa.Column( | ||
"status", | ||
sa.String(), | ||
nullable=False, | ||
), | ||
sa.Column("error_msg", sa.Text(), nullable=True), | ||
sa.Column( | ||
"updated_at", | ||
sa.DateTime(timezone=True), | ||
server_default=sa.text("now()"), | ||
nullable=False, | ||
), | ||
sa.ForeignKeyConstraint( | ||
["cc_pair_id"], | ||
["connector_credential_pair.id"], | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.drop_table("permission_sync_run") | ||
op.drop_table("external_permission") | ||
op.drop_table("email_to_external_user_cache") |
Oops, something went wrong.