mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-16 23:16:48 +00:00
encrypt-password
This commit is contained in:
@@ -8,6 +8,7 @@ import { idToUuid, getPageTableOfContents } from 'notion-utils'
|
||||
import Router from 'next/router'
|
||||
import { isBrowser } from '@/lib/utils'
|
||||
import { getNotion } from '@/lib/notion/getNotion'
|
||||
import md5 from 'js-md5'
|
||||
|
||||
/**
|
||||
* 根据notion的slug访问页面
|
||||
@@ -57,7 +58,7 @@ const Slug = props => {
|
||||
* @param {*} result
|
||||
*/
|
||||
const validPassword = passInput => {
|
||||
if (passInput && passInput === post.password) {
|
||||
if (passInput && md5(post.slug + passInput) === post.password) {
|
||||
setLock(false)
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user