Skip to content

Commit

Permalink
Merge pull request #2996 from robertcheramy/2021-login-banner
Browse files Browse the repository at this point in the history
Fixed login into Fortigate when post-login-baner ist enabled
  • Loading branch information
robertcheramy authored Dec 4, 2023
2 parents a35d690 + 9917a1b commit b1d502f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- fixed source http when source is librenms (@davama)
- fixed prompt detection for Netgear M4250-10G2XF-PoE+ and M4300-28G-PoE+ (@rexhaugen)
- fixed devices (pfsense, opnsense, openwrt) not retriving config after refinement change #2771 #2968 (@robertcheramy)
- Fixed login into Fortigate when post-login-baned ist enabled. Fixes #2021 (@chrisr0880, @sahdan, @dangoscomb and @robertcheramy)

## [0.29.1 - 2023-04-24]

Expand Down
6 changes: 6 additions & 0 deletions lib/oxidized/model/fortios.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ class FortiOS < Oxidized::Model

prompt /^([-\w.~]+(\s[(\w\-.)]+)?~?\s?[#>$]\s?)$/

# When a post-login-banner is enabled, you have to press "a" to log in
expect /^\(Press\s'a'\sto\saccept\):/ do |data, re|
send 'a'
data.sub re, ''
end

expect /^--More--\s$/ do |data, re|
send ' '
data.sub re, ''
Expand Down

0 comments on commit b1d502f

Please sign in to comment.