Pinacolada64 / ImageBBS

A bulletin board system (BBS) for the Commodore 64.
15 stars 5 forks source link

+.lo - Linefeeds assumed from failed login #41

Closed ThaDoctor72 closed 5 years ago

ThaDoctor72 commented 6 years ago

Linefeeds don't reset to default at login screen. Steps to recreate:

  1. Connect via ASCII or ANSI terminal that would normally need LFs
  2. Attempt to login as a user with no linefeeds (C64 user)
  3. Fail authentication with bad password at this point, the setting from that user's lf is used
  4. Return to login prompt and attempt login as anyone else settings (not sure how many) appear to be in effect for the attempted failed user

Would clear arrays be appropriate here? At this stage of login, we've already established baud, translation, and graphics status.

ThaDoctor72 commented 6 years ago

I expanded the research on this a little bit. Using an ANSI terminal I connected and attempted to login as a user with no linefeeds. (Can be simulated by a user entering what they "thought" was their ID#, while actually being that of a user with C64 configuration. The issue becomes apparent after completing the password attempt. (security check) Further research reveals that this happens when the attempted user is a non-converted 1.2 user, more specifically one who has not had record# 13 of u.config converted from the single digit linefeeds integer (ll) to the 11 digit flag string (uf$). During the load of user information (im.misc), an UNCONVERTED user still has the left padding on that record. Wonder if that's getting a false null for linefeeds? Also, since lf% is being set here, does the matching lightbar flag being set? Doesn't look like it, all I see is the menu mode (&,52,44) and more prompt mode (&,52,34) being set on line 60042 (im.misc)

Pinacolada64 commented 6 years ago

The lightbar position would be &,52,17:

https://github.com/Pinacolada64/ImageBBS/blob/e79a6f28c5543759345edb05b4c6bf073f4dc760/v2/docs/lightbar.txt#L49

We could add that somewhere. Not sure just where at the moment. Not sure about lf% right now. So many variables!

Sounds like we need to add stuff to record 13 in u.config on conversion from 1.2 -> 2.0, then.

Pinacolada64 commented 5 years ago

+.lo: lf=1 happens twice, but never applied to &,52,17, which is called a few times. Then lf is overwritten by im.misc loading stats, of which one is lf.

I'm thinking lf% (or some other temporary variable) should save the user's initial linefeed setting at graphics detection, then restore it after the failed login. I'm working on a pull request to see about the feasibility of this.

Pinacolada64 commented 5 years ago

@ThaDoctor72 , what do you think of this fix?

ThaDoctor72 commented 5 years ago

That, or just enable them by default for all computer types. That's how 1.2 did it, which is better in my opinion. It's easier to recover from too many linefeeds than not enough.

On Tue, Feb 19, 2019 at 11:39 AM Ryan Sherwood notifications@github.com wrote:

@ThaDoctor72 https://github.com/ThaDoctor72 , what do you think of this fix?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Pinacolada64/ImageBBS/issues/41#issuecomment-465210607, or mute the thread https://github.com/notifications/unsubscribe-auth/Ao7IS8ty4y3IBZSI92F7_vzSPhcPD6E1ks5vPCjdgaJpZM4XbQUM .

ThaDoctor72 commented 5 years ago

Honestly I have not seen a terminal in years that produced "too many" linefeeds, since nobody uses WYSE boxes anymore. I would say have all user accounts updated to 1 for linefeeds, and if someone has issues with it they can turn it off. It would be a vast minority of users who have issues with extra feeds. Better to have too many than not enough, in my opinion.