Fixes #1554
This commit is contained in:
@@ -238,7 +238,19 @@ shared_examples WPScan::Target::Platform::WordPress do
|
||||
end
|
||||
|
||||
describe '#login_url' do
|
||||
before { allow(target).to receive(:sub_dir) }
|
||||
before do
|
||||
allow(target).to receive(:sub_dir)
|
||||
|
||||
WPScan::ParsedCli.options = rspec_parsed_options(cli_args)
|
||||
end
|
||||
|
||||
let(:cli_args) { '--url https://ex.lo' }
|
||||
|
||||
context 'when login_uri CLI option set' do
|
||||
let(:cli_args) { "#{super()} --login_uri other-login.php" }
|
||||
|
||||
its(:login_url) { should eql target.url('other-login.php') }
|
||||
end
|
||||
|
||||
context 'when returning a 200' do
|
||||
before { stub_request(:get, target.url('wp-login.php')).to_return(status: 200) }
|
||||
|
||||
Reference in New Issue
Block a user