RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
fix `superuser` password not base64 encoded (#2475)
Dada Hsueh2484e26cb59c
diff --git a/api/db/init_data.py b/api/db/init_data.pyindex e4f61093b1..d8837ddf08 100644--- a/api/db/init_data.py+++ b/api/db/init_data.py@@ -13,6 +13,7 @@# See the License for the specific language governing permissions and# limitations under the License.#+import base64import jsonimport osimport time@@ -30,11 +31,14 @@ from api.db.services.user_service import TenantService, UserTenantServicefrom api.settings import CHAT_MDL, EMBEDDING_MDL, ASR_MDL, IMAGE2TEXT_MDL, PARSERS, LLM_FACTORY, API_KEY, LLM_BASE_URLfrom api.utils.file_utils import get_project_base_directory+def encode_to_base64(input_string):+ base64_encoded = base64.b64encode(input_string.encode('utf-8'))+ return base64_encoded.decode('utf-8')def init_superuser():user_info = {"id": uuid.uuid1().hex,- "password": "admin",+ "password": encode_to_base64("admin"),"nickname": "admin","is_superuser": True,"email": "[email protected]",