MarisElsins / getMOSPatch

getMOSPatch V2 - Tool that helps downloading patches from My Oracle Support
58 stars 17 forks source link

Continually being prompted for username/password #14

Closed dbpiv closed 5 years ago

dbpiv commented 5 years ago

When using getMOSPatch I am being prompted for credentials even though I have supplied them.

java -jar getMOSPatch.jar patch=28542658 platform=226P stagedir=~/Downloads/MOSPatch download=all Enter your MOS username: me@email.com Enter your MOS password: Enter your MOS username: me@email.com Enter your MOS password: Enter your MOS username: me@email.com Enter your MOS password:

dbpiv_tbMBP:~ dbpiv$ java -jar getMOSPatch.jar MOSUser='me@email.com' MOSPass='SuperSecretPassword' patch=28542658 platform=226P stagedir=~/Downloads/MOSPatch download=all Enter your MOS username: me@email.com Enter your MOS password: Enter your MOS username: me@email.com Enter your MOS password: Enter your MOS username: me@email.com Enter your MOS password:

I believe this is related to the the latest Mojave upgrade.

javac -version javac 1.8.0_172

MarisElsins commented 5 years ago

Hi Daniel,

thanks for reporting this. Unfortunately I couldn't reproduce the same issue, also I don't have an OS X to try it on.

Typically the login details are asked for again when the login is unsuccessful (yea, I'm not clearly showing what goes wrong), You could add an additional flag (-Djavax.net.debug=all) to the command to report all HTTP communications like this: java -Djavax.net.debug=all -jar getMOSPatch.jar MOSUser='me@email.com' MOSPass='SuperSecretPassword' patch=28542658 platform=226P stagedir=~/Downloads/MOSPatch download=all But it is very excessive, however, you might find some ssl handshake issues or HTTP return codes that signal of any errors. If that helps, you could provide me with the outputs, and I'd try figuring out what goes wrong in the process (if you decide on this, make sure your password is not revealed).

I.e. I tried running it by providing a wrong password, and found the following HTTP code returned "HTTP/1.1 401 Unauthorized":

...
main, READ: TLSv1.2 Application Data, length = 319
Padded plaintext after DECRYPTION:  len = 295
0000: 48 54 54 50 2F 31 2E 31   20 34 30 31 20 55 6E 61  HTTP/1.1 401 Una
0010: 75 74 68 6F 72 69 7A 65   64 0D 0A 44 61 74 65 3A  uthorized..Date:
0020: 20 57 65 64 2C 20 32 34   20 4F 63 74 20 32 30 31   Wed, 24 Oct 201
0030: 38 20 31 31 3A 32 33 3A   35 38 20 47 4D 54 0D 0A  8 11:23:58 GMT..
0040: 53 65 72 76 65 72 3A 20   4F 72 61 63 6C 65 2D 41  Server: Oracle-A
0050: 70 70 6C 69 63 61 74 69   6F 6E 2D 53 65 72 76 65  pplication-Serve
0060: 72 2D 31 31 67 0D 0A 43   6F 6E 74 65 6E 74 2D 4C  r-11g..Content-L
0070: 65 6E 67 74 68 3A 20 31   34 36 38 0D 0A 57 57 57  ength: 1468..WWW
0080: 2D 41 75 74 68 65 6E 74   69 63 61 74 65 3A 20 42  -Authenticate: B
0090: 61 73 69 63 20 72 65 61   6C 6D 3D 22 57 65 62 4C  asic realm="WebL
00A0: 6F 67 69 63 20 53 65 72   76 65 72 22 0D 0A 4B 65  ogic Server"..Ke
00B0: 65 70 2D 41 6C 69 76 65   3A 20 74 69 6D 65 6F 75  ep-Alive: timeou
00C0: 74 3D 35 2C 20 6D 61 78   3D 31 30 30 0D 0A 43 6F  t=5, max=100..Co
00D0: 6E 6E 65 63 74 69 6F 6E   3A 20 4B 65 65 70 2D 41  nnection: Keep-A
00E0: 6C 69 76 65 0D 0A 43 6F   6E 74 65 6E 74 2D 54 79  live..Content-Ty
00F0: 70 65 3A 20 74 65 78 74   2F 68 74 6D 6C 3B 20 63  pe: text/html; c
0100: 68 61 72 73 65 74 3D 55   54 46 2D 38 0D 0A 43 6F  harset=UTF-8..Co
0110: 6E 74 65 6E 74 2D 4C 61   6E 67 75 61 67 65 3A 20  ntent-Language:
0120: 65 6E 0D 0A 0D 0A 3C                               en....<
Enter your MOS username:

Maris

dbpiv commented 5 years ago

DOH! My apologies. I forgot that I updated my password for oracle.com. You were correct to assume it was a password issue. Thanks for taking the time to follow up.

dp

MarisElsins commented 5 years ago

No Problem :) Better this than something wrong with the tool :D