mirror of
https://github.com/neocities/neocities.git
synced 2025-08-03 08:11:56 +02:00
prohibit third-party form sites that are almost exclusively used for phishing
This commit is contained in:
parent
c2978f03f0
commit
e1ef255f84
3 changed files with 58 additions and 21 deletions
|
@ -48,6 +48,11 @@ describe 'site_files' do
|
|||
end
|
||||
|
||||
describe 'upload' do
|
||||
it 'fails for suspected phishing' do
|
||||
upload 'files[]' => Rack::Test::UploadedFile.new('./tests/files/phishing.html', 'text/html')
|
||||
File.exists?(@site.files_path('phishing.html')).must_equal false
|
||||
end
|
||||
|
||||
it 'works with empty files' do
|
||||
upload 'files[]' => Rack::Test::UploadedFile.new('./tests/files/empty.js', 'text/javascript')
|
||||
File.exists?(@site.files_path('empty.js')).must_equal true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue