修改 Dockerfile,解决构建时错误
This commit is contained in:
@@ -14,7 +14,7 @@ function generateCaptchaText(length: number = 4): string {
|
||||
}
|
||||
|
||||
// 哈希验证码文本并使用随机盐值
|
||||
function hashCaptcha(text: string): { hash: string; salt: string } {
|
||||
function hashCaptcha(text: string): { hash: string, salt: string } {
|
||||
const salt = crypto.randomBytes(16).toString('hex')
|
||||
const hash = crypto
|
||||
.createHmac('sha256', salt)
|
||||
|
||||
@@ -2,6 +2,7 @@ import {useCallback, useEffect, useState} from 'react'
|
||||
import {Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle} from '@/components/ui/dialog'
|
||||
import {Button} from '@/components/ui/button'
|
||||
import {Input} from '@/components/ui/input'
|
||||
import Image from 'next/image'
|
||||
|
||||
export type CaptchaProps = {
|
||||
showCaptcha: boolean
|
||||
@@ -44,7 +45,7 @@ export default function Captcha(props: CaptchaProps) {
|
||||
</DialogHeader>
|
||||
<div className="space-y-4">
|
||||
<div className="flex justify-between items-center">
|
||||
<img
|
||||
<Image
|
||||
src={captchaImage}
|
||||
alt="验证码"
|
||||
width={180}
|
||||
|
||||
Reference in New Issue
Block a user