NATION

PASSWORD

NationStates++ | Extension for NationStates

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.

Advertisement

Remove ads

User avatar
Afforess
Ambassador
 
Posts: 1105
Founded: Jun 22, 2009
Ex-Nation

Postby Afforess » Fri Jul 19, 2013 11:10 pm

Avakael wrote:Quick bug: when using the dark skin, NS++ messes with the CSS and makes telegrams unreadable without highlighting them. As a result, I've had to turn it off. :unsure:

Will have a fix out shortly, discovered why. Stupid Jquery-UI library... >:(
Minister of the Interior, Capitalist Paradise

The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.

User avatar
[violet]
Executive Director
 
Posts: 16217
Founded: Antiquity

Postby [violet] » Fri Jul 19, 2013 11:21 pm

Afforess wrote:
[violet] wrote:Why are you verifying nation ownership anyway? I read the TG from the bot but still don't understand.

To prevent another nation from being able to read/write to user settings or issue choices. I generate a login token for firebase based on my secret key + nation name which is unique and lasts for 30 days. If I didn't do this, any nation could start manipulating another users settings or previous issue selections. Or I would not be able to use cloud backup/syncing.

By user settings you mean the "NS++ Settings"? Like whether I've enabled Embassy Flags or whatever? That's not actually tied to a nation account, is it? It seems specific to the extension.

Issue choices I'm unclear about, too... I don't get why you need a TG from a nation to prevent other people from answering their issues.

More fundamentally I'm confused by why sending a TG proves that the user is logged in any more than just, you know, them being logged in. It proves to YOU that someone is using your extension but I'm not sure what it's doing for the user.

User avatar
[violet]
Executive Director
 
Posts: 16217
Founded: Antiquity

Postby [violet] » Fri Jul 19, 2013 11:23 pm

Afforess wrote:My alias 'Afforess' is pretty well linked with my real-life identity, so if I did something malicious, it would get back to me and it would affect my employment situation.

Good to know! If you can send us a highly incriminating photograph of yourself wearing only underpants, that would be helpful, too.

User avatar
Afforess
Ambassador
 
Posts: 1105
Founded: Jun 22, 2009
Ex-Nation

Postby Afforess » Fri Jul 19, 2013 11:30 pm

[violet] wrote:
Afforess wrote:To prevent another nation from being able to read/write to user settings or issue choices. I generate a login token for firebase based on my secret key + nation name which is unique and lasts for 30 days. If I didn't do this, any nation could start manipulating another users settings or previous issue selections. Or I would not be able to use cloud backup/syncing.

By user settings you mean the "NS++ Settings"? Like whether I've enabled Embassy Flags or whatever? That's not actually tied to a nation account, is it? It seems specific to the extension.

Yes, it's tied to a nation account.

However, if the nation has no previous settings, it uses whatever settings the last user was using. So if you create a puppet, it will use the latest settings the main nation had. This part is not an actual feature, but a result of caching the settings in localStorage. It just happens to work out in a convenient way.
[violet] wrote:Issue choices I'm unclear about, too... I don't get why you need a TG from a nation to prevent other people from answering their issues.

I could erase months of your issue choices, and set them to something else secretly. It would be hard to prove, and Gaslighting users is not fun.

[violet] wrote:More fundamentally I'm confused by why sending a TG proves that the user is logged in any more than just, you know, them being logged in. It proves to YOU that someone is using your extension but I'm not sure what it's doing for the user.

It proves that they are logged in and received the telegram, as opposed to, someone else. Only you can read your telegrams, no one else. The extension checks for the telegram, and upon finding the unique code, uses that.

I realize it seems like massive overkill for past issue choices and user settings but keep in mind I plan on using this for more data in the future, this is just essentially the trial run to prove it works. I want to expand the dossier capabilities, track all the nation stats and wa census variables over time, etc. This will all need to be synced, and localStorage is a poor place to keep permanent data. I considered other services like Dropbox, but requiring users to keep a separate account for advanced features would effectively cut my userbase in half, if not more.

Edit: However, if you would like to provide an up to 5mb json storage option for each user, I would totally use that. Then you could be sure the data was secure and under your control.
Last edited by Afforess on Fri Jul 19, 2013 11:32 pm, edited 1 time in total.
Minister of the Interior, Capitalist Paradise

The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.

User avatar
Individuality-ness
Post Czar
 
Posts: 37712
Founded: Mar 02, 2011
Ex-Nation

Postby Individuality-ness » Fri Jul 19, 2013 11:40 pm

[violet] wrote:
Afforess wrote:My alias 'Afforess' is pretty well linked with my real-life identity, so if I did something malicious, it would get back to me and it would affect my employment situation.

Good to know! If you can send us a highly incriminating photograph of yourself wearing only underpants, that would be helpful, too.

May no one ever claim that [violet] lacks a sense of humor.
"I should have listened to her, so hard to keep control. We kept on eating but our bloated bellies still not full."
Poetry Thread | How to Not Rape | Aspergers v. Assburgers | You Might be an Altie If... | Factbook/Extension

User avatar
Hyperion
Minister
 
Posts: 2314
Founded: Mar 28, 2013
Ex-Nation

Postby Hyperion » Sat Jul 20, 2013 12:09 am

Individuality-ness wrote:
[violet] wrote:Good to know! If you can send us a highly incriminating photograph of yourself wearing only underpants, that would be helpful, too.

May no one ever claim that [violet] lacks a sense of humor.


What humor?
Exchange Rate: Hypernote
2.55 H$= 1 N$ = 2 USD
Unemployment: 9%
GPD/Capita: H$ 8,930
Debt: H$ -416,215,102
Details:
http://www.nstracker.net/hyperion&page=economics
Total: 2,080,205
Land: 1,337,700
Navy: 205,800
Airforce: 514,500
Budget: 20%
Details:http://www.nstracker.net/hyperion&page=military
Tax: 29%
Population: 1.029 Billion
Animal: Colossal Squid
Industry: Pizza Delivery
Currency: Hyper-Note
Leader: J Humble
http://www.nstracker.net/hyperion
Administration: 2%
Welfare: 12%
Education: 22%
Defence: 20%
Public Transport: 9%
Environment: 22%
Not listed? We don't fund it.
Help get my new Issue "One Nation under Who?" ready for a send off!

NSG's Atheist Man Child
Married to Sanguinea

User avatar
Afforess
Ambassador
 
Posts: 1105
Founded: Jun 22, 2009
Ex-Nation

Postby Afforess » Sat Jul 20, 2013 12:25 am

Version 1.82
  • Fixed bugs with telegrams & dark theme
  • Fixed bugs with NS++ settings pages and dark theme
  • Added option in NS++ settings to disable Puppet Switching
  • Minor css fixes

You should auto-update as usual without having to do anything. Enjoy.
Minister of the Interior, Capitalist Paradise

The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.

User avatar
Grobladonia
Spokesperson
 
Posts: 114
Founded: Mar 01, 2013
Ex-Nation

Postby Grobladonia » Sat Jul 20, 2013 4:56 am

I'm afraid it's not quite fixed yet. When closed the TGs look like they should, but when opened they still partially display the bug, such as here.

EDIT: And square flags still appear stretched. Very wide flags might be compressed as well, but I can't quite tell. It may be more subtle, or it may be not be there at all. This only happens in lists, such as the Dossier.
Last edited by Grobladonia on Sat Jul 20, 2013 6:03 am, edited 1 time in total.
I broke the Corrupt a Wish thread! :D

The Saint James Islands wrote:Grobladonia is very sneaky...
He is a devilishly sneaky devil...
- referring to a clue in a guessing game I made.

Economic Left/Right: -7.50
Social Libertarian/Authoritarian: -7.74

User avatar
Afforess
Ambassador
 
Posts: 1105
Founded: Jun 22, 2009
Ex-Nation

Postby Afforess » Sat Jul 20, 2013 11:29 am

Grobladonia wrote:I'm afraid it's not quite fixed yet. When closed the TGs look like they should, but when opened they still partially display the bug, such as here.

EDIT: And square flags still appear stretched. Very wide flags might be compressed as well, but I can't quite tell. It may be more subtle, or it may be not be there at all. This only happens in lists, such as the Dossier.

All fixed.
Minister of the Interior, Capitalist Paradise

The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.

User avatar
Grobladonia
Spokesperson
 
Posts: 114
Founded: Mar 01, 2013
Ex-Nation

Postby Grobladonia » Sat Jul 20, 2013 12:47 pm

Excellent! Thank you! :)

This is just a suggestion. You might want to consider reducing the transparency of the puppet switcher. When it hovers over the nation name it can be a bit tricky to read in the first second or so (until my eyes adjust). This isn't really an issue, just a personal preference of mine.
I broke the Corrupt a Wish thread! :D

The Saint James Islands wrote:Grobladonia is very sneaky...
He is a devilishly sneaky devil...
- referring to a clue in a guessing game I made.

Economic Left/Right: -7.50
Social Libertarian/Authoritarian: -7.74

User avatar
Avakael
Bureaucrat
 
Posts: 63
Founded: Mar 07, 2009
Corrupt Dictatorship

Postby Avakael » Sat Jul 20, 2013 4:49 pm

Afforess wrote:
Grobladonia wrote:I'm afraid it's not quite fixed yet. When closed the TGs look like they should, but when opened they still partially display the bug, such as here.

EDIT: And square flags still appear stretched. Very wide flags might be compressed as well, but I can't quite tell. It may be more subtle, or it may be not be there at all. This only happens in lists, such as the Dossier.

All fixed.

Nope, sorry, not for me. :|
Klaus Devestatorie. Not the other way around.

User avatar
Afforess
Ambassador
 
Posts: 1105
Founded: Jun 22, 2009
Ex-Nation

Postby Afforess » Sat Jul 20, 2013 5:04 pm

Avakael wrote:
Afforess wrote:All fixed.

Nope, sorry, not for me. :|

Can you please post a screenshot that shows what you bugs are seeing? Thanks.
Last edited by Afforess on Sat Jul 20, 2013 5:05 pm, edited 1 time in total.
Minister of the Interior, Capitalist Paradise

The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.

User avatar
Avakael
Bureaucrat
 
Posts: 63
Founded: Mar 07, 2009
Corrupt Dictatorship

Postby Avakael » Sat Jul 20, 2013 6:43 pm

Afforess wrote:
Avakael wrote:Nope, sorry, not for me. :|

Can you please post a screenshot that shows what you bugs are seeing? Thanks.

The standard page gives me this;
http://i.imgur.com/ES9wAKF.png
Background of individual PMs has reverted to default theme color, as has the text on the buttons at the bottom. The text slightly increases in size as well. The page appears fine for a split second, but the script seems to automatically make these changes- with the exception of the button text color, which seems to load wrong from the start.

When I open a specific telegram, I get this.
http://i.imgur.com/tTwO07K.png
The button text, the telegram text and telegram background are fine. The URL text is grey instead of green, and we still have the white artifacts.

I am using Waterfox version 18.0.1.
Last edited by Avakael on Sat Jul 20, 2013 6:44 pm, edited 1 time in total.
Klaus Devestatorie. Not the other way around.

User avatar
Hyperion
Minister
 
Posts: 2314
Founded: Mar 28, 2013
Ex-Nation

Postby Hyperion » Sat Jul 20, 2013 7:05 pm

Waterfox has a modified code than Firefox, so while it CAN run Firefox plugins, it can't exactly run them too well. It would need to have support adjusted. Also, I just don't like how Waterfox looks.
Exchange Rate: Hypernote
2.55 H$= 1 N$ = 2 USD
Unemployment: 9%
GPD/Capita: H$ 8,930
Debt: H$ -416,215,102
Details:
http://www.nstracker.net/hyperion&page=economics
Total: 2,080,205
Land: 1,337,700
Navy: 205,800
Airforce: 514,500
Budget: 20%
Details:http://www.nstracker.net/hyperion&page=military
Tax: 29%
Population: 1.029 Billion
Animal: Colossal Squid
Industry: Pizza Delivery
Currency: Hyper-Note
Leader: J Humble
http://www.nstracker.net/hyperion
Administration: 2%
Welfare: 12%
Education: 22%
Defence: 20%
Public Transport: 9%
Environment: 22%
Not listed? We don't fund it.
Help get my new Issue "One Nation under Who?" ready for a send off!

NSG's Atheist Man Child
Married to Sanguinea

User avatar
Avakael
Bureaucrat
 
Posts: 63
Founded: Mar 07, 2009
Corrupt Dictatorship

Postby Avakael » Sat Jul 20, 2013 10:59 pm

Hyperion wrote:Waterfox has a modified code than Firefox, so while it CAN run Firefox plugins, it can't exactly run them too well. It would need to have support adjusted. Also, I just don't like how Waterfox looks.

It's been working fine until just recently.
EDIT: In fact, with the exemption of the button text color, it -is- fine now. Cheers!
Last edited by Avakael on Sat Jul 20, 2013 11:00 pm, edited 1 time in total.
Klaus Devestatorie. Not the other way around.

User avatar
Grobladonia
Spokesperson
 
Posts: 114
Founded: Mar 01, 2013
Ex-Nation

Postby Grobladonia » Sun Jul 21, 2013 2:56 am

I've got another bug. The puppet switcher misfires sometimes. When I click certain puppets instead of logging in I'm just simply take to it's nation page. Interestingly, one such puppet worked a few times, but it no longer does.

Deleting it from the list and adding it again seems to clear it up.
Last edited by Grobladonia on Sun Jul 21, 2013 2:57 am, edited 1 time in total.
I broke the Corrupt a Wish thread! :D

The Saint James Islands wrote:Grobladonia is very sneaky...
He is a devilishly sneaky devil...
- referring to a clue in a guessing game I made.

Economic Left/Right: -7.50
Social Libertarian/Authoritarian: -7.74

User avatar
Wind in the Willows
Negotiator
 
Posts: 6770
Founded: Apr 02, 2012
Ex-Nation

Postby Wind in the Willows » Sun Jul 21, 2013 2:57 am

I love this. Best extension ever.

User avatar
The IASM
Senator
 
Posts: 3598
Founded: Jan 01, 2012
Ex-Nation

Postby The IASM » Sun Jul 21, 2013 2:57 am

Excellent.
HUN-01

20:22 Kirav Normal in Akai is nightmare fuel in the rest of the world.
11:33 Jedoria Something convoluted is going on in Akai probably.
Transoxthraxia: I'm no hentai connoisseur, but I'm pretty sure Akai's domestic politics would be like, at least top ten most fucked up hentais"
18:26 Deusaeuri Let me put it this way, you're what would happen if Lovecraft decided to write political dystopian techno thriller
20:19 Heku tits has gone mental
20:19 Jakee >gone
05:48 Malay lol akai sounds lovely this time of never


User avatar
Kalosia
Minister
 
Posts: 3169
Founded: Jan 09, 2013
Democratic Socialists

Postby Kalosia » Sun Jul 21, 2013 3:04 am

When can we expect a Safari version?
Mediterranea > Mediterra > Kalosia
/kə'loʊʒɑː/ (english) /kɑː'lɒsiːɑː/ (kalosian)
Factbook | Official Website

WorldVision Song Contest results
World Hit Festival results (incomplete)

User avatar
Afforess
Ambassador
 
Posts: 1105
Founded: Jun 22, 2009
Ex-Nation

Postby Afforess » Sun Jul 21, 2013 9:45 am

Grobladonia wrote:I've got another bug. The puppet switcher misfires sometimes. When I click certain puppets instead of logging in I'm just simply take to it's nation page. Interestingly, one such puppet worked a few times, but it no longer does.

Deleting it from the list and adding it again seems to clear it up.

This means you entered the wrong user/pass. I'll look into making it tell you it failed to login in the future.
Minister of the Interior, Capitalist Paradise

The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.

User avatar
Afforess
Ambassador
 
Posts: 1105
Founded: Jun 22, 2009
Ex-Nation

Postby Afforess » Sun Jul 21, 2013 9:46 am

Kalosia wrote:When can we expect a Safari version?

After it happens. I don't give ETA's because I never can predict.
Minister of the Interior, Capitalist Paradise

The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.

User avatar
Grobladonia
Spokesperson
 
Posts: 114
Founded: Mar 01, 2013
Ex-Nation

Postby Grobladonia » Sun Jul 21, 2013 2:25 pm

Afforess wrote:
Grobladonia wrote:I've got another bug. The puppet switcher misfires sometimes. When I click certain puppets instead of logging in I'm just simply take to it's nation page. Interestingly, one such puppet worked a few times, but it no longer does.

Deleting it from the list and adding it again seems to clear it up.

This means you entered the wrong user/pass. I'll look into making it tell you it failed to login in the future.


Well, that's the weird thing, it logged me in once or twice with that nation, then stopped working. And I haven't changed anything.
I broke the Corrupt a Wish thread! :D

The Saint James Islands wrote:Grobladonia is very sneaky...
He is a devilishly sneaky devil...
- referring to a clue in a guessing game I made.

Economic Left/Right: -7.50
Social Libertarian/Authoritarian: -7.74

User avatar
Afforess
Ambassador
 
Posts: 1105
Founded: Jun 22, 2009
Ex-Nation

Postby Afforess » Sun Jul 21, 2013 3:15 pm

Unfortunately for Safari fans, Apple's developer center is down, and has been down for the last 2 days: http://devimages.apple.com/maintenance/

I will start on a Safari port as soon as Apple's developer center is back. I have no idea when that will be.
Last edited by Afforess on Sun Jul 21, 2013 3:15 pm, edited 1 time in total.
Minister of the Interior, Capitalist Paradise

The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.

User avatar
[violet]
Executive Director
 
Posts: 16217
Founded: Antiquity

Postby [violet] » Sun Jul 21, 2013 4:35 pm

Afforess wrote:
[violet] wrote:Issue choices I'm unclear about, too... I don't get why you need a TG from a nation to prevent other people from answering their issues.

I could erase months of your issue choices, and set them to something else secretly.

You are talking about some NS++ issue-related feature, right? Since there is no ability in NS to change past issue choices. I'm not sure what exactly you are erasing.

Afforess wrote:This will all need to be synced, and localStorage is a poor place to keep permanent data.

If I understand this right, what you want is for the user effectively to create an NS++ account on your server, but you don't want them to have to do this manually (and come up with a password for it, etc). So in lieu of a password, your extension wants to piggyback off NS authentication, and make sure the user is logged into NS before offering up access to any stored NS++ data. But this makes it vulnerable to a situation where, for example, a user alters their machine's DNS settings and creates a fake nationstates.net that verifies the user is logged in as anyone. So you do a TG exchange with your bot that proves to you that the nation is indeed logged in, and then they get access to an NS++ account in that nation's name.

Is that right? If so, what happens when I delete that TG and switch browsers? I'm logging in as the same nation and using NS++ but how do you know it's really me?

The TG bot is clever but definitely sub-optimal. It surprised me to see a telegram in my Sent Items that I never sent (is there any warning about this?). And it seems like a violation of site script rules, which prohibit the auto-sending of TGs.

Afforess wrote:Edit: However, if you would like to provide an up to 5mb json storage option for each user, I would totally use that. Then you could be sure the data was secure and under your control.

We are unlikely to do that, but we have tossed around various authentication schemes for 3rd-party sites, as you know. So possibly a nation could generate a key, and that key would authenticate them to you.

User avatar
Afforess
Ambassador
 
Posts: 1105
Founded: Jun 22, 2009
Ex-Nation

Postby Afforess » Sun Jul 21, 2013 5:59 pm

[violet] wrote:
Afforess wrote:I could erase months of your issue choices, and set them to something else secretly.

You are talking about some NS++ issue-related feature, right? Since there is no ability in NS to change past issue choices. I'm not sure what exactly you are erasing.


There is some misunderstanding here. The feature is that it tracks what issue choices your nation has made in the past, and lets you know when the issue arises again in the future. Repeat issues is a common occurrence for NS'ers, and it's handy to know what I answered when I saw the issue last time. I can't change past issue choices, but I keep track of what issue choice was decided and the timestamp of when it was made.

[violet] wrote:
Afforess wrote:This will all need to be synced, and localStorage is a poor place to keep permanent data.

If I understand this right, what you want is for the user effectively to create an NS++ account on your server, but you don't want them to have to do this manually (and come up with a password for it, etc). So in lieu of a password, your extension wants to piggyback off NS authentication, and make sure the user is logged into NS before offering up access to any stored NS++ data. But this makes it vulnerable to a situation where, for example, a user alters their machine's DNS settings and creates a fake nationstates.net that verifies the user is logged in as anyone. So you do a TG exchange with your bot that proves to you that the nation is indeed logged in, and then they get access to an NS++ account in that nation's name.

Is that right? If so, what happens when I delete that TG and switch browsers? I'm logging in as the same nation and using NS++ but how do you know it's really me?


If you switch browsers or machines, it re-authenticates by sending another telegram. That machine uses the token from the new response from the bot. The old machine or browser can still use the old token as well.

The token is actually a JSON Web Token (JWT) with the name of the nation as the payload, signed with SHA256 HMAC & a secret key, and encoded in BASE-64.

[violet] wrote:The TG bot is clever but definitely sub-optimal. It surprised me to see a telegram in my Sent Items that I never sent (is there any warning about this?). And it seems like a violation of site script rules, which prohibit the auto-sending of TGs.


One could argue that the process of installing the extension is in fact the 'user input' that causes the telegram to be sent. Anyway, it's the best solution I had available to me.

[violet] wrote:
Afforess wrote:Edit: However, if you would like to provide an up to 5mb json storage option for each user, I would totally use that. Then you could be sure the data was secure and under your control.

We are unlikely to do that, but we have tossed around various authentication schemes for 3rd-party sites, as you know. So possibly a nation could generate a key, and that key would authenticate them to you.

That would be an ideal solution.
Last edited by Afforess on Sun Jul 21, 2013 6:04 pm, edited 4 times in total.
Minister of the Interior, Capitalist Paradise

The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.

PreviousNext

Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Haku

Advertisement

Remove ads

cron