Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一些建议 #95

Closed
caspershw opened this issue Jun 27, 2020 · 6 comments · Fixed by #123
Closed

一些建议 #95

caspershw opened this issue Jun 27, 2020 · 6 comments · Fixed by #123
Labels
question Further information is requested
Projects

Comments

@caspershw
Copy link

  • 可以加入自定义paste过期时间,能够查看次数等
  • 索引使用随机数字可能会被恶意遍历,泄露隐私,建议采用随机生成短字符串的方式作为索引
  • 可以加入raw方式预览内容,方便cli中调用
  • 希望能够支持更多类型语言的高亮
@LucienShui
Copy link
Owner

您好,感谢您的建议!

1. 可以加入自定义paste过期时间,能够查看次数等

#59 有提到类似的功能,还在规划中。

2. 索引使用随机数字可能会被恶意遍历,泄露隐私,建议采用随机生成短字符串的方式作为索引

我感觉设置密码可以做到即便被恶意遍历了也不会泄露内容。
以及,阅后即焚的索引正是随机短字符串。
如有其它意见,烦请补充。

3. 可以加入raw方式预览内容,方便cli中调用

参考 API 访问 api.pasteme.cn/:token?json=true 即可看到 raw 内容,默认 json=false

比如:curl 'api.pasteme.cn/100?json=true'curl 'api.pasteme.cn/100'

4. 希望能够支持更多类型语言的高亮

有“比如”吗?我不知道小伙伴们平时比较常用哪些,只放了一些我感觉会用得比较频繁的语言类型。

@caspershw
Copy link
Author

  1. 可以考虑在后端配置加上开关,设定用随机字符串或者顺序数字作为索引
  2. 这些常见的语言也可以加上
  • JavaScript
  • PHP
  • CSS
  • HTML
  • Perl
  • Ruby
  • Swift
  • Objective C
  • YAML

@LucienShui
Copy link
Owner

LucienShui commented Jun 28, 2020

1. 可以考虑在后端配置加上开关,设定用随机字符串或者顺序数字作为索引

如果永久存储的 Paste 也支持字符串的话,会对数据库性能产生影响,需要在实用性和性能之间做一下评估。

2. 这些常见的语言也可以加上

如果支持的高亮太多的话,下拉框会不会很难看?

@LucienShui LucienShui added the question Further information is requested label Jun 28, 2020
@caspershw
Copy link
Author

1. 可以考虑在后端配置加上开关,设定用随机字符串或者顺序数字作为索引

如果永久存储的 Paste 也支持字符串的话,会对数据库性能产生影响,需要在实用性和性能之间做一下评估。

2. 这些常见的语言也可以加上

如果支持的高亮太多的话,下拉框会不会很难看?

下拉框的话可以做成限高+滚动条的形式,比全部展示出来应该会好一些

@LucienShui
Copy link
Owner

LucienShui commented Jun 28, 2020

有道理!Orz

@LucienShui LucienShui added this to To do in 3.4.0 Jul 22, 2021
@LucienShui LucienShui linked a pull request Sep 20, 2021 that will close this issue
@LucienShui
Copy link
Owner

#123

除了支持更多高亮,其余的现均已支持。

更多的高亮会单独开一个 issue 来跟进。

感谢小伙伴对 PasteMe 的认可!

3.4.0 automation moved this from To do to Done Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
3.4.0
Done
Development

Successfully merging a pull request may close this issue.

2 participants