Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby interpreter warning #200

Closed
betesh opened this issue Mar 20, 2017 · 4 comments
Closed

Ruby interpreter warning #200

betesh opened this issue Mar 20, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@betesh
Copy link

betesh commented Mar 20, 2017

jwt-1.5.6/lib/jwt/decode.rb:26: warning: instance variable @signature not initialized
@betesh betesh changed the title Ruby compiler warning Ruby interpreter warning Mar 20, 2017
@excpt
Copy link
Member

excpt commented Mar 20, 2017

Which version of ruby are you using and what code did you use that invoked that error?

@betesh
Copy link
Author

betesh commented Mar 20, 2017

$ rvm current
ruby-2.3.0
$ ruby -e "require 'jwt'; "\
> "puts JWT.decode('eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo1NCwiZXhwIjoxNDkwMTM3ODgyfQ.XhCblmItXo4XK-iOZ-b9ZCMx1n69kjzyJ2AnGdfnLHs', '', false).inspect"
~/.rvm/gems/ruby-2.3.0/gems/jwt-1.5.6/lib/jwt/decode.rb:26: warning: instance variable @signature not initialized
[{"user_id"=>54, "exp"=>1490137882}, {"typ"=>"JWT", "alg"=>"HS256"}]

@excpt
Copy link
Member

excpt commented Mar 21, 2017

Thanks for the additional information.

@excpt excpt self-assigned this Mar 22, 2017
@excpt excpt added this to the Version 2.0.0 milestone Mar 22, 2017
@excpt
Copy link
Member

excpt commented Mar 22, 2017

This is only triggered when the payload contains jwt claims and verify is set to false.

Related line of code in the current code base: https://github.com/jwt/ruby-jwt/blob/master/lib/jwt/decode.rb#L23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants